ceiled dimension now have 64 max render distance + various small changes

This commit is contained in:
Leonardo
2021-10-14 02:29:42 +02:00
parent 2c6549e815
commit 15e80ed063
4 changed files with 6 additions and 8 deletions
@@ -267,10 +267,4 @@ public class VerticalLevelContainer implements LevelContainer
{
return size * size * getMaxVerticalData();
}
@Override
public int getMaxMemoryUse()
{
return getMaxNumberOfLods() * 2; //2 byte
}
}
@@ -327,7 +327,7 @@ public class ClientProxy
// calculate how wide the dimension(s) should be in regions
int chunksWide;
if (mc.getClientWorld().dimensionType().hasCeiling())
chunksWide = Math.max(LodConfig.CLIENT.graphics.lodChunkRenderDistance.get(), 64) * 2 + 1;
chunksWide = Math.min(LodConfig.CLIENT.graphics.lodChunkRenderDistance.get(), LodUtil.CEILED_DIMENSION_MAX_RENDER_DISTANCE) * 2 + 1;
else
chunksWide = LodConfig.CLIENT.graphics.lodChunkRenderDistance.get() * 2 + 1;
@@ -238,7 +238,10 @@ public class LodRenderer
Matrix4f modelViewMatrix = offsetTheModelViewMatrix(mcMatrixStack, partialTicks);
// required for setupFog and setupProjectionMatrix
farPlaneBlockDistance = LodConfig.CLIENT.graphics.lodChunkRenderDistance.get() * LodUtil.CHUNK_WIDTH;
if (mc.getClientWorld().dimensionType().hasCeiling())
farPlaneBlockDistance = Math.min(LodConfig.CLIENT.graphics.lodChunkRenderDistance.get(), LodUtil.CEILED_DIMENSION_MAX_RENDER_DISTANCE) * LodUtil.CHUNK_WIDTH;
else
farPlaneBlockDistance = LodConfig.CLIENT.graphics.lodChunkRenderDistance.get() * LodUtil.CHUNK_WIDTH;
setupProjectionMatrix(mcProjectionMatrix, partialTicks);
// commented out until we can add shaders to handle lighting
@@ -72,6 +72,7 @@ public class LodUtil
public static final Color COLOR_DEBUG_WHITE = new Color(255, 255, 255, DEBUG_ALPHA);
public static final Color COLOR_INVISIBLE = new Color(0, 0, 0, 0);
public static final int CEILED_DIMENSION_MAX_RENDER_DISTANCE = 64; // 0 - 255
/**
* In order of nearest to farthest: <br>