fix crash on worlds with minHeight < 0

This commit is contained in:
Bixilon 2022-10-05 10:43:54 +02:00
parent bb607fc6aa
commit 34ba1330e2
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -192,7 +192,7 @@ class ChunkLight(private val chunk: Chunk) {
var y = minY
sectionLoop@ for (sectionIndex in (startY.sectionHeight - chunk.lowestSection) downTo chunk.lowestSection * ProtocolDefinition.SECTION_HEIGHT_Y) {
sectionLoop@ for (sectionIndex in (startY.sectionHeight - chunk.lowestSection) downTo 0) {
if (sectionIndex >= sections.size) {
// starting from above world
continue