geforkt von Mirrors/Paper
Added support back in for biome temperature and rainfall in snapshots.
Dieser Commit ist enthalten in:
Ursprung
5534efd66f
Commit
3f4ee9ab56
@ -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);
|
||||
|
@ -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];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren