Fix ChunkBatch not deserializing properly block state IDs > 255

This commit is contained in:
jglrxavpok 2020-12-29 16:17:27 +01:00
parent 3c871ed603
commit 997a76980f

View File

@ -211,9 +211,9 @@ public class ChunkBatch implements InstanceBatch {
* @param value the block data
*/
private void apply(@NotNull Chunk chunk, long value) {
final short customBlockId = (short) (value & 0xFF);
final short blockId = (short) (value >> 16 & 0xFF);
final int index = (int) (value >> 32 & 0xFFFF);
final short customBlockId = (short) (value & 0xFFFF);
final short blockId = (short) ((value >> 16) & 0xFFFF);
final int index = (int) ((value >> 32) & 0xFFFFFFFFFFL);
Data data = null;
if (!blockDataMap.isEmpty()) {