Fix mapping of ChunkSection nibble data to snapshot. Fixes BUKKIT-1977

This commit is contained in:
Mike Primm 2012-08-02 11:21:40 -05:00 committed by Travis Watkins
parent 35a3d701a9
commit c711827e94

View File

@ -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
}
}