diff options
author | Mike Primm <mike@primmhome.com> | 2012-08-02 11:21:40 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-08-02 21:45:54 -0500 |
commit | c711827e94f35881ee2ad877f55b62f326085460 (patch) | |
tree | 1e9831ed9f80362a87cede1a7d8df4b1a139d6f5 /src | |
parent | 35a3d701a90f685012eb78c3c31a43d3ef596392 (diff) | |
download | craftbukkit-c711827e94f35881ee2ad877f55b62f326085460.tar craftbukkit-c711827e94f35881ee2ad877f55b62f326085460.tar.gz craftbukkit-c711827e94f35881ee2ad877f55b62f326085460.tar.lz craftbukkit-c711827e94f35881ee2ad877f55b62f326085460.tar.xz craftbukkit-c711827e94f35881ee2ad877f55b62f326085460.zip |
Fix mapping of ChunkSection nibble data to snapshot. Fixes BUKKIT-1977
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftChunk.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index 4f9ac887..314c7323 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -183,8 +183,8 @@ public class CraftChunk implements Chunk { continue; } - blockids[j<<1] |= (b & 0xF0) << 4; - blockids[(j<<1)+1] |= (b & 0x0F) << 8; + blockids[j<<1] |= (b & 0x0F) << 8; + blockids[(j<<1)+1] |= (b & 0xF0) << 4; } } @@ -192,11 +192,11 @@ public class CraftChunk implements Chunk { /* Get block data nibbles */ sectionBlockData[i] = new byte[2048]; - System.arraycopy(cs[i].i().a, 0, sectionBlockData[i], 0, 2048); + System.arraycopy(cs[i].j().a, 0, sectionBlockData[i], 0, 2048); // Should be getData sectionSkyLights[i] = new byte[2048]; - System.arraycopy(cs[i].k().a, 0, sectionSkyLights[i], 0, 2048); + System.arraycopy(cs[i].l().a, 0, sectionSkyLights[i], 0, 2048); // Should be getSkyLight sectionEmitLights[i] = new byte[2048]; - System.arraycopy(cs[i].j().a, 0, sectionEmitLights[i], 0, 2048); + System.arraycopy(cs[i].k().a, 0, sectionEmitLights[i], 0, 2048); // Should be getBlockLight } } |