Fix an infinite loop in the lighting engine

Not sure how I didn't catch this until MC 1.21.5
This commit is contained in:
James Seibel
2025-03-29 15:29:34 -05:00
parent 91e17c420a
commit 2d127c7d98
@@ -328,7 +328,8 @@ public class DhLightingEngine
continue;
}
if (relNeighbourBlockPos.getY() < neighbourChunk.getMinNonEmptyHeight() || relNeighbourBlockPos.getY() > neighbourChunk.getExclusiveMaxBuildHeight())
if (relNeighbourBlockPos.getY() < neighbourChunk.getMinNonEmptyHeight()
|| relNeighbourBlockPos.getY() >= neighbourChunk.getExclusiveMaxBuildHeight())
{
// the light pos is outside the chunk's min/max height,
// this can happen if given a chunk that hasn't finished generating