From 2d127c7d98eeeb8429b741ae41f37efa90d62be2 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 29 Mar 2025 15:29:34 -0500 Subject: [PATCH] Fix an infinite loop in the lighting engine Not sure how I didn't catch this until MC 1.21.5 --- .../distanthorizons/core/generation/DhLightingEngine.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/generation/DhLightingEngine.java b/core/src/main/java/com/seibel/distanthorizons/core/generation/DhLightingEngine.java index 484c79eca..d1c25a06e 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/generation/DhLightingEngine.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/generation/DhLightingEngine.java @@ -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