diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index b02b3d3745..c03f1c7a5b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -164,9 +164,12 @@ public class CraftChunk implements Chunk { if (includeBiomeTempRain) { biomeTemp = new double[256]; biomeRain = new double[256]; - //System.arraycopy(wcm.temperature, 0, biomeTemp, 0, biomeTemp.length); - //System.arraycopy(wcm.rain, 0, biomeRain, 0, biomeRain.length); - // TODO: Figure out new snapshot stuff + float[] dat = wcm.a((float[]) null, getX() << 4, getZ() << 4, 16, 16); + for(int i = 0; i < 256; i++) + biomeTemp[i] = dat[i]; + dat = wcm.b((float[]) null, getX() << 4, getZ() << 4, 16, 16); + for(int i = 0; i < 256; i++) + biomeRain[i] = dat[i]; } } World world = getWorld(); @@ -219,9 +222,12 @@ public class CraftChunk implements Chunk { if (includeBiomeTempRain) { biomeTemp = new double[256]; biomeRain = new double[256]; - //System.arraycopy(wcm.temperature, 0, biomeTemp, 0, biomeTemp.length); - //System.arraycopy(wcm.rain, 0, biomeRain, 0, biomeRain.length); - // TODO: Figure out new snapshot stuff + float[] dat = wcm.a((float[]) null, x << 4, z << 4, 16, 16); + for(int i = 0; i < 256; i++) + biomeTemp[i] = dat[i]; + dat = wcm.b((float[]) null, x << 4, z << 4, 16, 16); + for(int i = 0; i < 256; i++) + biomeRain[i] = dat[i]; } } return new EmptyChunkSnapshot(x, z, world.getName(), world.getFullTime(), biome, biomeTemp, biomeRain); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java index d53a74c120..2b14f37ed3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java @@ -138,7 +138,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot { * @return Biome at given coordinate */ public Biome getBiome(int x, int z) { - return CraftBlock.biomeBaseToBiome(biome[x << 4 | z]); + return CraftBlock.biomeBaseToBiome(biome[z << 4 | x]); } /** @@ -149,7 +149,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot { * @return temperature at given coordinate */ public double getRawBiomeTemperature(int x, int z) { - return biomeTemp[x << 4 | z]; + return biomeTemp[z << 4 | x]; } /** @@ -160,7 +160,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot { * @return rainfall at given coordinate */ public double getRawBiomeRainfall(int x, int z) { - return biomeRain[x << 4 | z]; + return biomeRain[z << 4 | x]; } /**