Implemented new biome values
Dieser Commit ist enthalten in:
Ursprung
774e59e179
Commit
929e5ff6c7
@ -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) {
|
||||
|
@ -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;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren