[Bleeding] Prevent update inconsistencies on generation/decoration that span chunks. Fixes BUKKIT-871

This commit is contained in:
Mike Primm
2012-03-21 16:01:11 -05:00
committed by EvilSeph
parent 09a73d352c
commit f188afe794
12 changed files with 44 additions and 14 deletions

View File

@@ -192,6 +192,13 @@ public class ChunkProviderHell implements IChunkProvider {
this.t.a(this, this.o, i, j, abyte);
this.c.a(this, this.o, i, j, abyte);
Chunk chunk = new Chunk(this.o, abyte, i, j);
// CraftBukkit start - prime biome data to prevent uninitialized values racing to client
BiomeBase[] bb = this.o.getWorldChunkManager().getBiomeBlock(null, i * 16, j * 16, 16, 16);
byte[] biomes = chunk.l();
for(int idx = 0; idx < biomes.length; idx++) {
biomes[idx] = (byte) bb[idx].id;
}
// CraftBukkit end
chunk.m();
return chunk;