Archived
0

fix: serialize metadata

This commit is contained in:
2018-04-30 00:25:38 +03:00
parent ed22229bd2
commit 47b4d662e5

View File

@@ -56,7 +56,7 @@ public class ChunkDataPacket implements SCPacket {
if ((idx[1] % 2) > 0) { if ((idx[1] % 2) > 0) {
int i = (int) ((((idx[1]++) + 1) / 2d) - 1d); int i = (int) ((((idx[1]++) + 1) / 2d) - 1d);
byte b = chunkData.get(offset+i); byte b = chunkData.get(offset+i);
b = (byte)((b << 4) | (byte)chunk.getBlockMetadata(x, y, z)); b = (byte)((chunk.getBlockMetadata(x, y, z) << 4) | b);
chunkData.put(offset+i, b); chunkData.put(offset+i, b);
} else { } else {
int i = (int) ((((idx[1]++) + 1) / 2d) - .5d); int i = (int) ((((idx[1]++) + 1) / 2d) - .5d);