final fix for 1.18 y<0?

This commit is contained in:
cola98765
2021-12-14 20:45:38 +01:00
parent a4ebe3e3c1
commit 443d6165fa
3 changed files with 5 additions and 7 deletions
@@ -272,14 +272,12 @@ public class LodBuilder
{
yAbs = depth;
light = getLightValue(chunk, xAbs,yAbs,zAbs, true, hasSkyLight, true);
//TODO don't ask me why, but apparently it works
color = generateLodColor(chunk, config, xAbs, yAbs - MIN_WORLD_HEIGHT, zAbs);
color = generateLodColor(chunk, config, xAbs, yAbs, zAbs);
}
else
{
light = getLightValue(chunk, xAbs, yAbs, zAbs, hasCeiling, hasSkyLight, topBlock);
//TODO don't ask me why, but apparently it works
color = generateLodColor(chunk, config, xAbs, yAbs - MIN_WORLD_HEIGHT, zAbs);
color = generateLodColor(chunk, config, xAbs, yAbs, zAbs);
}
lightBlock = light & 0b1111;
lightSky = (light >> 4) & 0b1111;
@@ -524,7 +524,7 @@ public class VerticalLevelContainer implements LevelContainer
int j = 0;
while (count > verticalSize)
{
ii = DataPointUtil.WORLD_HEIGHT - DataPointUtil.VERTICAL_OFFSET;
ii = DataPointUtil.WORLD_HEIGHT;
for (i = 0; i < count - 1; i++)
{
if (heightAndDepth[i * 2 + 1] - heightAndDepth[(i + 1) * 2] <= ii)
@@ -867,7 +867,7 @@ public class VerticalLevelContainer implements LevelContainer
int j = 0;
while (count > verticalSize)
{
ii = DataPointUtil.WORLD_HEIGHT - DataPointUtil.VERTICAL_OFFSET;
ii = DataPointUtil.WORLD_HEIGHT;
for (i = 0; i < count - 1; i++)
{
if (heightAndDepth[i * 2 + 1] - heightAndDepth[(i + 1) * 2] <= ii)
@@ -415,7 +415,7 @@ public class DataPointUtil
int j = 0;
while (count > maxVerticalData)
{
ii = WORLD_HEIGHT - VERTICAL_OFFSET;
ii = WORLD_HEIGHT;
for (i = 0; i < count - 1; i++)
{
if (heightAndDepth[i * 2 + 1] - heightAndDepth[(i + 1) * 2] <= ii)