From c095c492e0264fc19a9d6f453183adf0f9f3f2e7 Mon Sep 17 00:00:00 2001 From: EpicPlayerA10 <62206933+EpicPlayerA10@users.noreply.github.com> Date: Fri, 7 Jun 2024 12:30:31 +0200 Subject: [PATCH] fix: normalize layer when setting ordinal to ThreadUnsafeCharBlocks (#2764) - fixes #2763 --- .../queue/implementation/blocks/ThreadUnsafeCharBlocks.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/ThreadUnsafeCharBlocks.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/ThreadUnsafeCharBlocks.java index 54331279f..90ae6b32e 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/ThreadUnsafeCharBlocks.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/ThreadUnsafeCharBlocks.java @@ -222,7 +222,7 @@ public class ThreadUnsafeCharBlocks implements IChunkSet, IBlocks { } public void set(int x, int y, int z, char value) { - final int layer = y >> 4; + final int layer = (y >> 4) - minSectionPosition; final int index = (y & 15) << 8 | z << 4 | x; try { blocks[layer][index] = value;