diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java index 01322d8752..b909af3d6f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java @@ -126,7 +126,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot { Preconditions.checkState(biome != null, "ChunkSnapshot created without biome. Please call getSnapshot with includeBiome=true"); CraftChunk.validateChunkCoordinates(x, y, z); - return CraftBlock.biomeBaseToBiome(biome.getBiome(x, y, z)); + return CraftBlock.biomeBaseToBiome(biome.getBiome(x >> 2, y >> 2, z >> 2)); } @Override @@ -139,7 +139,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot { Preconditions.checkState(biome != null, "ChunkSnapshot created without biome. Please call getSnapshot with includeBiome=true"); CraftChunk.validateChunkCoordinates(x, y, z); - return biome.getBiome(x, y, z).getAdjustedTemperature(new BlockPosition((this.x << 4) | x, y, (this.z << 4) | z)); + return biome.getBiome(x >> 2, y >> 2, z >> 2).getAdjustedTemperature(new BlockPosition((this.x << 4) | x, y, (this.z << 4) | z)); } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index b38a9c5c7b..326835cf23 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -901,7 +901,7 @@ public class CraftWorld implements World { @Override public Biome getBiome(int x, int y, int z) { - return CraftBlock.biomeBaseToBiome(this.world.getBiome(new BlockPosition(x, y, z))); + return CraftBlock.biomeBaseToBiome(this.world.getBiome(x >> 2, y >> 2, z >> 2)); } @Override @@ -919,7 +919,7 @@ public class CraftWorld implements World { net.minecraft.server.Chunk chunk = this.world.getChunkAtWorldCoords(pos); if (chunk != null) { - chunk.getBiomeIndex().setBiome(x, y, z, bb); + chunk.getBiomeIndex().setBiome(x >> 2, y >> 2, z >> 2, bb); chunk.markDirty(); // SPIGOT-2890 } @@ -934,7 +934,7 @@ public class CraftWorld implements World { @Override public double getTemperature(int x, int y, int z) { BlockPosition pos = new BlockPosition(x, y, z); - return this.world.getBiome(pos).getAdjustedTemperature(pos); + return this.world.getBiome(x >> 2, y >> 2, z >> 2).getAdjustedTemperature(pos); } @Override @@ -944,7 +944,7 @@ public class CraftWorld implements World { @Override public double getHumidity(int x, int y, int z) { - return this.world.getBiome(new BlockPosition(x, y, z)).getHumidity(); + return this.world.getBiome(x >> 2, y >> 2, z >> 2).getHumidity(); } @Override