From c81991641a122d12493949589bf4a0030302b52d Mon Sep 17 00:00:00 2001 From: kuwacom Date: Wed, 11 Mar 2026 19:39:23 +0900 Subject: [PATCH] fix: fix the detection range for excessive logging `getHighestNonEmptyY()` returning `-1` occurs normally when the chunk is entirely air. The caller (`Minecraft.World/LevelChunk.cpp:2400`) normalizes `-1` to `0`. --- Minecraft.World/CompressedTileStorage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Minecraft.World/CompressedTileStorage.cpp b/Minecraft.World/CompressedTileStorage.cpp index 1c387eeb3..b093f8045 100644 --- a/Minecraft.World/CompressedTileStorage.cpp +++ b/Minecraft.World/CompressedTileStorage.cpp @@ -1311,7 +1311,7 @@ int CompressedTileStorage::getHighestNonEmptyY() // Multiply by the number of vertical tiles in a block, and then add that again to be at the top of the block highestNonEmptyY = (highestYBlock * 4) + 4; } - else + else if( allocatedSize != 1024 ) { app.DebugPrintf("[CTS-WARN] getHighestNonEmptyY() returned -1! allocatedSize=%d indicesAndData=%p\n", allocatedSize, indicesAndData); @@ -1380,4 +1380,4 @@ void CompressedTileStorage::reverseIndices(unsigned char *indices) { System::ReverseUSHORT(&blockIndices[i]); } -} \ No newline at end of file +}