From a641c2415a9e76ea13c4e1a5ac4120188c616563 Mon Sep 17 00:00:00 2001 From: TheMode Date: Tue, 22 Jun 2021 18:28:52 +0200 Subject: [PATCH] Fix block index computation --- src/main/java/net/minestom/server/utils/chunk/ChunkUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/utils/chunk/ChunkUtils.java b/src/main/java/net/minestom/server/utils/chunk/ChunkUtils.java index 071a387c5..bf70b742b 100644 --- a/src/main/java/net/minestom/server/utils/chunk/ChunkUtils.java +++ b/src/main/java/net/minestom/server/utils/chunk/ChunkUtils.java @@ -228,7 +228,7 @@ public final class ChunkUtils { z = z % Chunk.CHUNK_SIZE_Z; int index = x & 0xF; // 4 bits - index |= (y << 24) & 0x0FFFFFF0; // 24 bits + index |= (y << 4) & 0x0FFFFFF0; // 24 bits index |= (z << 28) & 0xF0000000; // 4 bits return index; }