summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2011-11-22 21:21:33 +0000
committerNathan Adams <dinnerbone@dinnerbone.com>2011-11-22 21:21:33 +0000
commit929e5ff6c762228952f873166f1bd985c68ed1e3 (patch)
treec4c7ae3905945cac8ffb94d3fe1077c4e14afee6 /src
parent774e59e179d055d3c525d2709e20a71a31276b3c (diff)
downloadcraftbukkit-929e5ff6c762228952f873166f1bd985c68ed1e3.tar
craftbukkit-929e5ff6c762228952f873166f1bd985c68ed1e3.tar.gz
craftbukkit-929e5ff6c762228952f873166f1bd985c68ed1e3.tar.lz
craftbukkit-929e5ff6c762228952f873166f1bd985c68ed1e3.tar.xz
craftbukkit-929e5ff6c762228952f873166f1bd985c68ed1e3.zip
Implemented new biome values
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftWorld.java25
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java16
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;