summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft
diff options
context:
space:
mode:
authorMike Primm <mike@primmhome.com>2012-03-20 15:04:37 -0500
committerEvilSeph <evilseph@gmail.com>2012-03-22 02:34:54 -0400
commit09a73d352c2ecc18a4265c70f9bf3dea1559df5c (patch)
treec45c8d237a78cb3b2d51abfe0616dcfaa066b38e /src/main/java/net/minecraft
parent6cd2a708031efd147ad6abf435f08ac49399ebf0 (diff)
downloadcraftbukkit-09a73d352c2ecc18a4265c70f9bf3dea1559df5c.tar
craftbukkit-09a73d352c2ecc18a4265c70f9bf3dea1559df5c.tar.gz
craftbukkit-09a73d352c2ecc18a4265c70f9bf3dea1559df5c.tar.lz
craftbukkit-09a73d352c2ecc18a4265c70f9bf3dea1559df5c.tar.xz
craftbukkit-09a73d352c2ecc18a4265c70f9bf3dea1559df5c.zip
[Bleeding] Make sure biome data is initialized during generate - prevent uninitialized data being sent to client. Fixes BUKKIT-871
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r--src/main/java/net/minecraft/server/ChunkProviderGenerate.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
index fc91383a..66d77c76 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
@@ -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;