From c68938c935591331a460d39b00b3973ec4dea24b Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 28 Jan 2023 11:49:44 +1100 Subject: [PATCH] SPIGOT-7214: Add CraftChunk and CraftChunkSnapshot contains biome method By: md_5 --- paper-api/src/main/java/org/bukkit/Chunk.java | 9 +++++++++ paper-api/src/main/java/org/bukkit/ChunkSnapshot.java | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/Chunk.java b/paper-api/src/main/java/org/bukkit/Chunk.java index 15478355e0..a33379e6df 100644 --- a/paper-api/src/main/java/org/bukkit/Chunk.java +++ b/paper-api/src/main/java/org/bukkit/Chunk.java @@ -1,6 +1,7 @@ package org.bukkit; import java.util.Collection; +import org.bukkit.block.Biome; import org.bukkit.block.Block; import org.bukkit.block.BlockState; import org.bukkit.block.data.BlockData; @@ -233,4 +234,12 @@ public interface Chunk extends PersistentDataHolder { * @return if the block is contained within */ boolean contains(@NotNull BlockData block); + + /** + * Tests if this chunk contains the specified biome. + * + * @param biome biome to test + * @return if the biome is contained within + */ + boolean contains(@NotNull Biome biome); } diff --git a/paper-api/src/main/java/org/bukkit/ChunkSnapshot.java b/paper-api/src/main/java/org/bukkit/ChunkSnapshot.java index fb3e166ec4..0cf808356a 100644 --- a/paper-api/src/main/java/org/bukkit/ChunkSnapshot.java +++ b/paper-api/src/main/java/org/bukkit/ChunkSnapshot.java @@ -164,4 +164,12 @@ public interface ChunkSnapshot { * @return if the block is contained within */ boolean contains(@NotNull BlockData block); + + /** + * Tests if this chunk contains the specified biome. + * + * @param biome biome to test + * @return if the biome is contained within + */ + boolean contains(@NotNull Biome biome); }