[Bleeding] Make sure biome data is initialized during generate - prevent uninitialized data being sent to client. Fixes BUKKIT-871

This commit is contained in:
Mike Primm 2012-03-20 15:04:37 -05:00 committed by EvilSeph
parent 6cd2a70803
commit 09a73d352c

View File

@ -192,6 +192,12 @@ public class ChunkProviderGenerate implements IChunkProvider {
}
Chunk chunk = new Chunk(this.p, abyte, i, j);
// CraftBukkit start - prime biome data to prevent uninitialized values racing to client
byte[] biomes = chunk.l();
for(int idx = 0; idx < biomes.length; idx++) {
biomes[idx] = (byte) this.y[idx].id;
}
// CraftBukkit end
chunk.initLighting();
return chunk;