diff options
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 25 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 16 |
2 files changed, 16 insertions, 25 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index b22653be..23469313 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -35,6 +35,7 @@ import org.bukkit.World; import org.bukkit.block.Biome; import org.bukkit.generator.BlockPopulator; import org.bukkit.Difficulty; +import org.bukkit.craftbukkit.block.CraftBlock; public class CraftWorld implements World { private final WorldServer world; @@ -476,29 +477,7 @@ public class CraftWorld implements World { public Biome getBiome(int x, int z) { BiomeBase base = getHandle().getWorldChunkManager().getBiome(x, z); - if (base == BiomeBase.SWAMPLAND) { - return Biome.SWAMPLAND; - } else if (base == BiomeBase.FOREST) { - return Biome.FOREST; - } else if (base == BiomeBase.TAIGA) { - return Biome.TAIGA; - } else if (base == BiomeBase.DESERT) { - return Biome.DESERT; - } else if (base == BiomeBase.PLAINS) { - return Biome.PLAINS; - } else if (base == BiomeBase.HELL) { - return Biome.HELL; - } else if (base == BiomeBase.SKY) { - return Biome.SKY; - } else if (base == BiomeBase.OCEAN) { - return Biome.OCEAN; - } else if (base == BiomeBase.EXTREME_HILLS) { - return Biome.EXTREME_HILLS; - } else if (base == BiomeBase.RIVER) { - return Biome.RIVER; - } - - return null; + return CraftBlock.biomeBaseToBiome(base); } public double getTemperature(int x, int z) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index 00548022..aeeeb4e0 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -220,10 +220,10 @@ public class CraftBlock implements Block { } public Biome getBiome() { - return biomeBaseToBiome(chunk.getHandle().world.getWorldChunkManager().getBiome(x, z)); + return getWorld().getBiome(x, z); } - public static final Biome biomeBaseToBiome(BiomeBase base) { + public static Biome biomeBaseToBiome(BiomeBase base) { if (base == BiomeBase.SWAMPLAND) { return Biome.SWAMPLAND; } else if (base == BiomeBase.FOREST) { @@ -244,6 +244,18 @@ public class CraftBlock implements Block { return Biome.EXTREME_HILLS; } else if (base == BiomeBase.OCEAN) { return Biome.OCEAN; + } else if (base == BiomeBase.FROZEN_OCEAN) { + return Biome.FROZEN_OCEAN; + } else if (base == BiomeBase.FROZEN_RIVER) { + return Biome.FROZEN_RIVER; + } else if (base == BiomeBase.ICE_PLAINS) { + return Biome.ICE_PLAINS; + } else if (base == BiomeBase.ICE_MOUNTAINS) { + return Biome.ICE_MOUNTAINS; + } else if (base == BiomeBase.MUSHROOM_ISLAND) { + return Biome.MUSHROOM_ISLAND; + } else if (base == BiomeBase.MUSHROOM_SHORE) { + return Biome.MUSHROOM_SHORE; } return null; |