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 e12c14f97..7f0463fe2 100644 --- a/src/main/java/net/minestom/server/utils/chunk/ChunkUtils.java +++ b/src/main/java/net/minestom/server/utils/chunk/ChunkUtils.java @@ -90,8 +90,9 @@ public final class ChunkUtils { public static short getLocalBlockPosAsShort(int x, int y, int z) { x = x % Chunk.CHUNK_SIZE_X; + y = y % Chunk.CHUNK_SIZE_Y; z = z % Chunk.CHUNK_SIZE_Z; - return (short) (x << 8 | y << 4 | z); + return (short) (x << 12 | y << 4 | z); } public static int getSectionAt(int y) {