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

Dieser Commit ist enthalten in:
Mike Primm 2012-03-20 15:04:37 -05:00 committet von EvilSeph
Ursprung 6cd2a70803
Commit 09a73d352c

Datei anzeigen

@ -192,6 +192,12 @@ public class ChunkProviderGenerate implements IChunkProvider {
} }
Chunk chunk = new Chunk(this.p, abyte, i, j); 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(); chunk.initLighting();
return chunk; return chunk;