Protect some calls that lead to loadChunk with blockExists (#53) (#72)

Co-authored-by: Yurii <[email protected]>
Co-authored-by: Martin Robertz <[email protected]>
Co-authored-by: micvog <[email protected]>
This commit is contained in:
authored and GitHub committed 2026-11-19 05:05:19 +01:00
1 parent 0d13cd0993
commit aae90342e5
1 file changed
+3
@@ -58,6 +58,9 @@ public class BlockUtil {
for (int chunkX = minChunkX; chunkX <= maxChunkX; ++chunkX) {
for (int chunkZ = minChunkZ; chunkZ <= maxChunkZ; ++chunkZ) {
if (!world.blockExists(chunkX << 4, 0, chunkZ << 4)) {
continue;
}
Chunk chunk = world.getChunkFromChunkCoords(chunkX, chunkZ);
if (chunk != null) searchChunks.add(chunk);
}