From f3b6b15bcbb50fe64a1eb1e2f3d5058474db1e5f Mon Sep 17 00:00:00 2001 From: cola98765 Date: Sun, 5 Dec 2021 20:03:17 +0100 Subject: [PATCH] reverted DrawResolutionOffset --- .../seibel/lod/core/util/DetailDistanceUtil.java | 14 ++++---------- .../java/com/seibel/lod/core/util/LodUtil.java | 3 +-- .../config/ILodConfigWrapperSingleton.java | 9 --------- 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/seibel/lod/core/util/DetailDistanceUtil.java b/src/main/java/com/seibel/lod/core/util/DetailDistanceUtil.java index 5db661f9e..67793fa3f 100644 --- a/src/main/java/com/seibel/lod/core/util/DetailDistanceUtil.java +++ b/src/main/java/com/seibel/lod/core/util/DetailDistanceUtil.java @@ -39,9 +39,7 @@ public class DetailDistanceUtil private static final double treeGenMultiplier = 1.0; private static final double treeCutMultiplier = 1.0; private static byte minGenDetail = CONFIG.client().graphics().quality().getDrawResolution().detailLevel; - private static byte minDrawDetail = (byte) Math.max(CONFIG.client().graphics().quality().getDrawResolution().detailLevel, CONFIG.client().graphics().quality().getDrawResolutionOffset()); - private static final int minGenDetailOffset = CONFIG.client().graphics().quality().getDrawResolutionOffset(); - private static final int minDrawDetailOffset = CONFIG.client().graphics().quality().getDrawResolutionOffset(); + private static byte minDrawDetail = CONFIG.client().graphics().quality().getDrawResolution().detailLevel; private static final int maxDetail = LodUtil.REGION_DETAIL_LEVEL + 1; private static final int minDistance = 0; private static int minDetailDistance = (int) (MC_RENDER.getRenderDistance()*16 * 1.42f); @@ -141,16 +139,12 @@ public class DetailDistanceUtil return CONFIG.client().worldGenerator().getDistanceGenerationMode(); } - public static byte getLodDrawDetail(int detail) + public static byte getLodDrawDetail(byte detail) { - detail += minDrawDetailOffset; + detail += minDrawDetail; if (detail > 10) detail = 10; - - if (detail < minDrawDetail) - return minDrawDetail; - else - return (byte) detail; + return detail; } public static HorizontalResolution getLodGenDetail(int detail) diff --git a/src/main/java/com/seibel/lod/core/util/LodUtil.java b/src/main/java/com/seibel/lod/core/util/LodUtil.java index cf200d148..f87c85f0a 100644 --- a/src/main/java/com/seibel/lod/core/util/LodUtil.java +++ b/src/main/java/com/seibel/lod/core/util/LodUtil.java @@ -307,7 +307,6 @@ public class LodUtil int skipRadius; VanillaOverdraw overdraw = CONFIG.client().graphics().advancedGraphics().getVanillaOverdraw(); HorizontalResolution drawRes = CONFIG.client().graphics().quality().getDrawResolution(); - int drawResOffset = CONFIG.client().graphics().quality().getDrawResolutionOffset(); // apply distance based rules for dynamic overdraw if (overdraw == VanillaOverdraw.DYNAMIC @@ -315,7 +314,7 @@ public class LodUtil { // The vanilla render distance isn't far enough // for partial skipping to make sense... - if (!lodDim.dimension.hasCeiling() && (drawRes == HorizontalResolution.BLOCK) && (drawResOffset == 0)) + if (!lodDim.dimension.hasCeiling() && (drawRes == HorizontalResolution.BLOCK)) { // ...and the dimension is open, so we don't have to worry about // LODs rendering on top of the player, diff --git a/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/ILodConfigWrapperSingleton.java b/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/ILodConfigWrapperSingleton.java index 65eacf132..2d0fc46e6 100644 --- a/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/ILodConfigWrapperSingleton.java +++ b/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/ILodConfigWrapperSingleton.java @@ -90,15 +90,6 @@ public interface ILodConfigWrapperSingleton HorizontalResolution getDrawResolution(); void setDrawResolution(HorizontalResolution newHorizontalResolution); - MinDefaultMax DRAW_RESOLUTION_OFFSET_MIN_DEFAULT_MAX = new MinDefaultMax(0, 0, 4); - String DRAW_RESOLUTION_OFFSET_DESC = "" - + " By how many levels should we lower resolution across the board?\n" - + " Very similar to 'Block size',\n" - + " but this setting will affect ALL chunks.\n" - + " Lower settings will increase memory and GPU usage. \n"; - Integer getDrawResolutionOffset(); - void setDrawResolutionOffset(int newDrawResolutionOffset); - MinDefaultMax LOD_CHUNK_RENDER_DISTANCE_MIN_DEFAULT_MAX = new MinDefaultMax(16, 64, 1024); String LOD_CHUNK_RENDER_DISTANCE_DESC = "" + " The radius of the mod's render distance. (measured in chunks) \n";