made project actually build after removing experimental light option

This commit is contained in:
cola98765
2021-10-16 22:18:24 +02:00
parent a0c14c86ca
commit e1b1f26f37
2 changed files with 16 additions and 15 deletions
@@ -463,24 +463,25 @@ public class LodBuilder
// client world sky light (almost never accurate)
// estimate what the lighting should be
if (!hasSkyLight && hasCeiling)
skyLight = 0;
else if (topBlock)
skyLight = DEFAULT_MAX_LIGHT;
else
if (hasSkyLight || !hasCeiling)
{
skyLight = clientWorld.getBrightness(LightType.SKY, blockPos);
if (!chunk.isLightCorrect() && (skyLight == 0 || skyLight == 15))
if (topBlock)
skyLight = DEFAULT_MAX_LIGHT;
else
{
// we don't know what the light here is,
// lets just take a guess
if (blockPos.getY() >= mc.getClientWorld().getSeaLevel() - 5)
skyLight = clientWorld.getBrightness(LightType.SKY, blockPos);
if (!chunk.isLightCorrect() && (skyLight == 0 || skyLight == 15))
{
skyLight = 12;
isDefault = 1;
// 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
skyLight = 0;
}
}
}
@@ -154,7 +154,7 @@ public class DataPointUtil
public static int getLightSkyAlt(long dataPoint)
{
if (LodConfig.CLIENT.worldGenerator.useExperimentalSkyLight.get() && skyLightPlayer == 0 && ((dataPoint >>> FLAG_SHIFT) & FLAG_MASK) == 1)
if (skyLightPlayer == 0 && ((dataPoint >>> FLAG_SHIFT) & FLAG_MASK) == 1)
return 0;
else
return (int) ((dataPoint >>> SKY_LIGHT_SHIFT) & SKY_LIGHT_MASK);