aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2021-06-20 00:02:03 +0200
committermakamys <makamys@outlook.com>2021-06-20 00:02:03 +0200
commitbecf56c8c73b05d0ed8df3b448e478f65eb5b820 (patch)
tree45d4b284e5a4781c9c80799742cf14ebba13ce05 /src
parent255bdd5dbfb2bed25a8b08df013d49524d564162 (diff)
downloadNeodymium-becf56c8c73b05d0ed8df3b448e478f65eb5b820.tar.gz
Neodymium-becf56c8c73b05d0ed8df3b448e478f65eb5b820.tar.bz2
Neodymium-becf56c8c73b05d0ed8df3b448e478f65eb5b820.zip
Add farPlaneDistanceMultiplier to config
Diffstat (limited to 'src')
-rw-r--r--src/main/java/makamys/lodmod/LODMod.java3
-rw-r--r--src/main/java/makamys/lodmod/renderer/LODRenderer.java4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/makamys/lodmod/LODMod.java b/src/main/java/makamys/lodmod/LODMod.java
index ceed97d..0bf46d7 100644
--- a/src/main/java/makamys/lodmod/LODMod.java
+++ b/src/main/java/makamys/lodmod/LODMod.java
@@ -52,6 +52,7 @@ public class LODMod
public static List<Class> blockClassBlacklist;
public static double fogStart;
public static double fogEnd;
+ public static double farPlaneDistanceMultiplier;
public static float maxSimpleMeshHeight;
public static boolean forceVanillaBiomeTemperature;
@@ -84,6 +85,8 @@ public class LODMod
.collect(Collectors.toList());
fogStart = config.get("Fog", "fogStart", "0.4").getDouble();
fogEnd = config.get("Fog", "fogEnd", "0.8").getDouble();
+ farPlaneDistanceMultiplier = config.get("Fog", "farPlaneDistanceMultiplier", "1.0").getDouble();
+
debugEnabled = config.get("Debug", "enabled", false).getBoolean();
maxSimpleMeshHeight = (float)config.get("Debug", "maxSimpleMeshHeight", 1000.0).getDouble();
diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
index e3cb045..6f4f6af 100644
--- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java
+++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
@@ -209,8 +209,8 @@ public class LODRenderer {
}
}
- public int getFarPlaneDistanceMultiplier() {
- return renderRange / 12;
+ public float getFarPlaneDistanceMultiplier() {
+ return renderRange / 12 * (float)LODMod.farPlaneDistanceMultiplier;
}
public void afterSetupFog(int mode, float alpha, float farPlaneDistance) {