Improve how dimension width is determined and add a TODO

This commit is contained in:
James Seibel
2021-05-31 16:43:42 -05:00
parent 402abb0963
commit 884f6811a1
@@ -10,6 +10,7 @@ import com.backsun.lod.objects.LodDimension;
import com.backsun.lod.objects.LodRegion;
import com.backsun.lod.objects.LodWorld;
import com.backsun.lod.render.LodRender;
import com.backsun.lod.util.LodConfig;
import com.backsun.lod.util.LodUtils;
import net.minecraft.client.Minecraft;
@@ -60,7 +61,10 @@ public class ClientProxy
return;
// update each regions' width to match the new render distance
int newWidth = Math.max(4, (mc.gameSettings.renderDistanceChunks * LodChunk.WIDTH * 2) / LodRegion.SIZE);
int newWidth = Math.max(4,
// TODO is this logic good?
(mc.gameSettings.renderDistanceChunks * LodChunk.WIDTH * 2 * LodConfig.CLIENT.lodChunkRadiusMultiplier.get()) / LodRegion.SIZE
);
if (lodBuilder.regionWidth != newWidth)
{
lodWorld.resizeDimensionRegionWidth(newWidth);