From 9f6f624e1d432c98a9fc708b6d5ea4454c958e9d Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 4 Mar 2012 10:40:27 -0600 Subject: [PATCH] [Bleeding] Add APIs for editing biome data. Addresses BUKKIT-1075 By: Mike Primm --- paper-api/src/main/java/org/bukkit/World.java | 13 ++++++++++--- paper-api/src/main/java/org/bukkit/block/Block.java | 7 +++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/World.java b/paper-api/src/main/java/org/bukkit/World.java index 9beee09364..2035a93b3e 100644 --- a/paper-api/src/main/java/org/bukkit/World.java +++ b/paper-api/src/main/java/org/bukkit/World.java @@ -692,14 +692,21 @@ public interface World extends PluginMessageRecipient, Metadatable { /** * Gets the biome for the given block coordinates. - *

- * It is safe to run this method when the block does not exist, it will not create the block. * * @param x X coordinate of the block * @param z Z coordinate of the block * @return Biome of the requested block */ - public Biome getBiome(int x, int z); + Biome getBiome(int x, int z); + + /** + * Sets the biome for the given block coordinates + * + * @param x X coordinate of the block + * @param z Z coordinate of the block + * @param bio new Biome type for this block + */ + void setBiome(int x, int z, Biome bio); /** * Gets the temperature for the given block coordinates. diff --git a/paper-api/src/main/java/org/bukkit/block/Block.java b/paper-api/src/main/java/org/bukkit/block/Block.java index f64a83beeb..3aca0c8210 100644 --- a/paper-api/src/main/java/org/bukkit/block/Block.java +++ b/paper-api/src/main/java/org/bukkit/block/Block.java @@ -231,6 +231,13 @@ public interface Block extends Metadatable { */ Biome getBiome(); + /** + * Sets the biome that this block resides in + * + * @param bio new Biome type for this block + */ + void setBiome(Biome bio); + /** * Returns true if the block is being powered by Redstone. *