fix: harry zhou's mistake

This commit is contained in:
ChomeNS
2025-02-19 09:03:59 +07:00
parent f91f9ef5ff
commit b534c57f0f
2 changed files with 5 additions and 2 deletions

View File

@@ -17,8 +17,11 @@ public class ChunkColumn {
this.pos = chunkPos;
this.minY = minY;
final int absoluteWorldHeight = Math.abs(worldHeight);
final int absoluteMinY = Math.abs(minY);
final ByteBuf in = Unpooled.wrappedBuffer(data);
final int numSections = -Math.floorDiv(-worldHeight, 16);
final int numSections = -Math.floorDiv(-(absoluteWorldHeight + absoluteMinY), 16);
chunks = new ChunkSection[numSections];