Fix max-height calculation (#535)

This commit is contained in:
Lukas Rieger (Blue) 2024-05-15 00:01:54 +02:00
parent 1b26803527
commit 2777846cf8
No known key found for this signature in database
GPG Key ID: AA33883B1BBA03E6

View File

@ -68,7 +68,7 @@ public void render(World world, Vector3i modelMin, Vector3i modelMax, TileModel
for (x = modelMin.getX(); x <= modelMax.getX(); x++){
for (z = modelMin.getZ(); z <= modelMax.getZ(); z++){
maxHeight = 0;
maxHeight = Integer.MIN_VALUE;
topBlockLight = 0;
columnColor.set(0, 0, 0, 0, true);
@ -105,6 +105,9 @@ public void render(World world, Vector3i modelMin, Vector3i modelMax, TileModel
}
}
if (maxHeight == Integer.MIN_VALUE)
maxHeight = 0;
tileMetaConsumer.set(x, z, columnColor, maxHeight, (int) topBlockLight);
}
}