Added support back in for biome temperature and rainfall in snapshots.

This commit is contained in:
Mike Primm
2011-09-15 15:57:37 -05:00
committed by EvilSeph
parent 5534efd66f
commit 3f4ee9ab56
2 changed files with 15 additions and 9 deletions

View File

@@ -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);