Fixed light on predicted chunks in caveworld.

This commit is contained in:
cola98765
2021-10-17 22:15:06 +02:00
parent 85157d0da0
commit d0f93a2c89
@@ -477,10 +477,23 @@ public class LodBuilder
{
// server world sky light (always accurate)
blockLight = serverWorld.getBrightness(LightType.BLOCK, blockPos);
if(!hasCeiling && topBlock && hasSkyLight)
if(topBlock && !hasCeiling && hasSkyLight)
skyLight = DEFAULT_MAX_LIGHT;
else
skyLight = serverWorld.getBrightness(LightType.SKY, blockPos);
if (!topBlock && skyLight == 15)
{
// we are on predicted terrain, and we don't know what the light here is,
// lets just take a guess
if (blockPos.getY() >= mc.getClientWorld().getSeaLevel() - 5)
{
skyLight = 12;
isDefault = 1;
}
else
skyLight = 0;
}
}
else
{