fix: normalize layer when setting ordinal to ThreadUnsafeCharBlocks (#2764)

- fixes #2763
This commit is contained in:
EpicPlayerA10 2024-06-07 12:30:31 +02:00 committed by GitHub
parent 5714a52675
commit c095c492e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;