diff --git a/api/src/main/java/com/seibel/lod/api/enums/config/ELightGenerationMode.java b/api/src/main/java/com/seibel/lod/api/enums/config/ELightGenerationMode.java
index 8518b74d1..8d945689d 100644
--- a/api/src/main/java/com/seibel/lod/api/enums/config/ELightGenerationMode.java
+++ b/api/src/main/java/com/seibel/lod/api/enums/config/ELightGenerationMode.java
@@ -24,7 +24,7 @@ package com.seibel.lod.api.enums.config;
* FANCY,
*
* @author Leetom
- * @version 2022-7-1
+ * @version 2023-6-7
*/
public enum ELightGenerationMode
{
@@ -32,9 +32,8 @@ public enum ELightGenerationMode
// when adding items up the API minor version
// when removing items up the API major version
- /** Fake light values using a height map */
- FAST,
+ DISTANT_HORIZONS,
+
+ MINECRAFT
- /** Run the lighting engine though the chunk to generate proper light values */
- FANCY
}
diff --git a/api/src/main/java/com/seibel/lod/api/enums/config/EServerFolderNameMode.java b/api/src/main/java/com/seibel/lod/api/enums/config/EServerFolderNameMode.java
index da4bda15b..b4aa4dd52 100644
--- a/api/src/main/java/com/seibel/lod/api/enums/config/EServerFolderNameMode.java
+++ b/api/src/main/java/com/seibel/lod/api/enums/config/EServerFolderNameMode.java
@@ -21,10 +21,10 @@
package com.seibel.lod.api.enums.config;
/**
- * AUTO,
* NAME_ONLY,
* NAME_IP,
- * NAME_IP_PORT,
+ * NAME_IP_PORT,
+ * NAME_IP_PORT_MC_VERSION,
*
* Determines how the multiplayer folders should be named.
*
@@ -38,12 +38,6 @@ public enum EServerFolderNameMode
// when removing items up the API major version
- /**
- * NAME_IP for LAN connections
- * NAME_IP_PORT for all others
- */
- AUTO,
-
/** Only use the server name */
NAME_ONLY,
diff --git a/api/src/main/java/com/seibel/lod/api/enums/config/quickOptions/EQuickQuality.java b/api/src/main/java/com/seibel/lod/api/enums/config/quickOptions/EQuickQuality.java
new file mode 100644
index 000000000..daf4e182e
--- /dev/null
+++ b/api/src/main/java/com/seibel/lod/api/enums/config/quickOptions/EQuickQuality.java
@@ -0,0 +1,45 @@
+/*
+ * This file is part of the Distant Horizons mod (formerly the LOD Mod),
+ * licensed under the GNU LGPL v3 License.
+ *
+ * Copyright (C) 2020-2022 James Seibel
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.seibel.lod.api.enums.config.quickOptions;
+
+/**
+ * CUSTOM,
+ *
+ * MINIMUM,
+ * LOW,
+ * MEDIUM,
+ * HIGH,
+ * EXTREME,
+ */
+public enum EQuickQuality
+{
+ // Reminder:
+ // when adding items up the API minor version
+ // when removing items up the API major version
+
+ CUSTOM,
+
+ MINIMUM,
+ LOW,
+ MEDIUM,
+ HIGH,
+ EXTREME;
+
+}
\ No newline at end of file
diff --git a/api/src/main/java/com/seibel/lod/api/enums/config/quickOptions/EQuickThread.java b/api/src/main/java/com/seibel/lod/api/enums/config/quickOptions/EQuickThread.java
new file mode 100644
index 000000000..c712922d9
--- /dev/null
+++ b/api/src/main/java/com/seibel/lod/api/enums/config/quickOptions/EQuickThread.java
@@ -0,0 +1,45 @@
+/*
+ * This file is part of the Distant Horizons mod (formerly the LOD Mod),
+ * licensed under the GNU LGPL v3 License.
+ *
+ * Copyright (C) 2020-2022 James Seibel
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.seibel.lod.api.enums.config.quickOptions;
+
+/**
+ * CUSTOM,
+ *
+ * MINIMAL_IMPACT,
+ * LOW_IMPACT,
+ * BALANCED,
+ * FAST_LOADING,
+ * I_PAID_FOR_THE_WHOLE_CPU,
+ */
+public enum EQuickThread
+{
+ // Reminder:
+ // when adding items up the API minor version
+ // when removing items up the API major version
+
+ CUSTOM,
+
+ MINIMAL_IMPACT,
+ LOW_IMPACT,
+ BALANCED,
+ FAST_LOADING,
+ I_PAID_FOR_THE_WHOLE_CPU;
+
+}
\ No newline at end of file
diff --git a/api/src/main/java/com/seibel/lod/api/enums/rendering/EDebugMode.java b/api/src/main/java/com/seibel/lod/api/enums/rendering/EDebugMode.java
index ac30a42c9..cfae31adb 100644
--- a/api/src/main/java/com/seibel/lod/api/enums/rendering/EDebugMode.java
+++ b/api/src/main/java/com/seibel/lod/api/enums/rendering/EDebugMode.java
@@ -20,20 +20,15 @@
package com.seibel.lod.api.enums.rendering;
/**
- * OFF,
- * SHOW_WIREFRAME,
- * SHOW_DETAIL,
- * SHOW_DETAIL_WIREFRAME,
- * SHOW_GENMODE,
- * SHOW_GENMODE_WIREFRAME,
- * SHOW_OVERLAPPING_QUADS,
- * SHOW_OVERLAPPING_QUADS_WIREFRAME,
- * SHOW_RENDER_SOURCE_FLAG,
- * SHOW_RENDER_SOURCE_FLAG_WIREFRAME,
+ * OFF,
+ * SHOW_DETAIL,
+ * SHOW_GENMODE,
+ * SHOW_OVERLAPPING_QUADS,
+ * SHOW_RENDER_SOURCE_FLAG,
*
* @author Leetom
* @author James Seibel
- * @version 2022-7-2
+ * @version 2023-6-7
*/
public enum EDebugMode
{
@@ -44,68 +39,40 @@ public enum EDebugMode
/** LODs are rendered normally */
OFF,
-
- /** LOD draws in wireframe. */
- SHOW_WIREFRAME,
/** LOD colors are based on their detail */
SHOW_DETAIL,
- /** LOD colors are based on their detail, and draws in wireframe. */
- SHOW_DETAIL_WIREFRAME,
-
/** LOD colors are based on their gen mode. */
SHOW_GENMODE,
- /** LOD colors are based on their gen mode, and draws in wireframe. */
- SHOW_GENMODE_WIREFRAME,
-
/** Only draw overlapping LOD quads. */
SHOW_OVERLAPPING_QUADS,
-
- /** Only draw overlapping LOD quads, and draws in wireframe. */
- SHOW_OVERLAPPING_QUADS_WIREFRAME,
-
+
/** LOD colors are based on renderSource flags. */
- SHOW_RENDER_SOURCE_FLAG,
-
- /** LOD colors are based on renderSource flags, and draws in wireframe. */
- SHOW_RENDER_SOURCE_FLAG_WIREFRAME;
-
- /** returns the next debug mode */
- // Deprecated: use DebugMode.next() instead
- @Deprecated
- public EDebugMode getNext()
+ SHOW_RENDER_SOURCE_FLAG;
+
+
+ public static EDebugMode next(EDebugMode type)
{
- return next(this);
- }
-
- public static EDebugMode next(EDebugMode type) {
- switch (type) {
- case OFF: return SHOW_WIREFRAME;
- case SHOW_WIREFRAME: return SHOW_DETAIL;
- case SHOW_DETAIL: return SHOW_DETAIL_WIREFRAME;
- case SHOW_DETAIL_WIREFRAME: return SHOW_GENMODE;
- case SHOW_GENMODE: return SHOW_GENMODE_WIREFRAME;
- case SHOW_GENMODE_WIREFRAME: return SHOW_OVERLAPPING_QUADS;
- case SHOW_OVERLAPPING_QUADS: return SHOW_OVERLAPPING_QUADS_WIREFRAME;
- case SHOW_OVERLAPPING_QUADS_WIREFRAME: return SHOW_RENDER_SOURCE_FLAG;
- case SHOW_RENDER_SOURCE_FLAG: return SHOW_RENDER_SOURCE_FLAG_WIREFRAME;
+ switch (type)
+ {
+ case OFF: return SHOW_DETAIL;
+ case SHOW_DETAIL: return SHOW_GENMODE;
+ case SHOW_GENMODE: return SHOW_OVERLAPPING_QUADS;
+ case SHOW_OVERLAPPING_QUADS: return SHOW_RENDER_SOURCE_FLAG;
default: return OFF;
}
}
- public static EDebugMode previous(EDebugMode type) {
- switch (type) {
- case OFF: return SHOW_RENDER_SOURCE_FLAG_WIREFRAME;
- case SHOW_RENDER_SOURCE_FLAG_WIREFRAME: return SHOW_RENDER_SOURCE_FLAG;
- case SHOW_RENDER_SOURCE_FLAG: return SHOW_OVERLAPPING_QUADS_WIREFRAME;
- case SHOW_OVERLAPPING_QUADS_WIREFRAME: return SHOW_OVERLAPPING_QUADS;
- case SHOW_OVERLAPPING_QUADS: return SHOW_GENMODE_WIREFRAME;
- case SHOW_GENMODE_WIREFRAME: return SHOW_GENMODE;
- case SHOW_GENMODE: return SHOW_DETAIL_WIREFRAME;
- case SHOW_DETAIL_WIREFRAME: return SHOW_DETAIL;
- case SHOW_DETAIL: return SHOW_WIREFRAME;
+ public static EDebugMode previous(EDebugMode type)
+ {
+ switch (type)
+ {
+ case OFF: return SHOW_RENDER_SOURCE_FLAG;
+ case SHOW_RENDER_SOURCE_FLAG: return SHOW_OVERLAPPING_QUADS;
+ case SHOW_OVERLAPPING_QUADS: return SHOW_GENMODE;
+ case SHOW_GENMODE: return SHOW_DETAIL;
default: return OFF;
}
}
diff --git a/api/src/main/java/com/seibel/lod/api/interfaces/config/both/IDhApiWorldGenerationConfig.java b/api/src/main/java/com/seibel/lod/api/interfaces/config/both/IDhApiWorldGenerationConfig.java
index d50679f97..e9f8b51c6 100644
--- a/api/src/main/java/com/seibel/lod/api/interfaces/config/both/IDhApiWorldGenerationConfig.java
+++ b/api/src/main/java/com/seibel/lod/api/interfaces/config/both/IDhApiWorldGenerationConfig.java
@@ -46,12 +46,6 @@ public interface IDhApiWorldGenerationConfig extends IDhApiConfigGroup
/** Defines to what level fake chunks will be generated. */
IDhApiConfigValue getDistantGeneratorMode();
- /** Defines how generated fake chunks will be lit. */
- IDhApiConfigValue getLightingMode();
-
- /** Defines the order in which fake chunks will be generated. */
- IDhApiConfigValue getGenerationPriority();
-
/**
* Defines what blocks will be ignored when generating LODs.
*
diff --git a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiGraphicsConfig.java b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiGraphicsConfig.java
index a8cb99fa5..db6b2a485 100644
--- a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiGraphicsConfig.java
+++ b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiGraphicsConfig.java
@@ -81,7 +81,7 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
* 2 = blending of 5x5
* ...
*/
- IDhApiConfigValue getBiomeBlending();
+// IDhApiConfigValue getBiomeBlending();
@@ -89,15 +89,6 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
// advanced graphic settings //
//===========================//
- /** If directional culling is disabled fake chunks will be rendered behind the camera. */
- IDhApiConfigValue getDisableDirectionalCulling();
-
- /** Determines how fake chunks are rendered in comparison to vanilla MC's chunks. */
- IDhApiConfigValue getVanillaOverdraw();
-
- /** Modifies how far the vanilla overdraw is rendered in chunks. */
- IDhApiConfigValue getVanillaOverdrawOffset();
-
/**
* If enabled the near clip plane is extended to reduce
* overdraw and improve Z-fighting at extreme render distances.
@@ -130,9 +121,6 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
/** If enabled vanilla chunk rendering is disabled and only fake chunks are rendered. */
IDhApiConfigValue getEnableLodOnlyMode();
- /** Defines how often the geometry should be rebuilt when the player moves. */
- IDhApiConfigValue getGeometryRebuildFrequency();
-
}
diff --git a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiGraphicsFogConfig.java b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiGraphicsFogConfig.java
index 37035826d..a060a316e 100644
--- a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiGraphicsFogConfig.java
+++ b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiGraphicsFogConfig.java
@@ -87,7 +87,7 @@ public interface IDhApiGraphicsFogConfig extends IDhApiConfigGroup
IDhApiConfigValue getFogMaxThickness();
/** Defines how the fog changes in thickness. */
- IDhApiConfigValue getFogFalloff();
+ IDhApiConfigValue getFarFogFalloff();
/** Defines the fog density. */
IDhApiConfigValue getFogDensity();
diff --git a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/both/DhApiWorldGenerationConfig.java b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/both/DhApiWorldGenerationConfig.java
index aff18f21f..f88dc0aee 100644
--- a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/both/DhApiWorldGenerationConfig.java
+++ b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/both/DhApiWorldGenerationConfig.java
@@ -22,7 +22,7 @@ package com.seibel.lod.core.api.external.methods.config.both;
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.interfaces.config.both.IDhApiWorldGenerationConfig;
import com.seibel.lod.api.objects.config.DhApiConfigValue;
-import com.seibel.lod.core.config.Config.Client.WorldGenerator;
+import com.seibel.lod.core.config.Config.Client.Advanced.WorldGenerator;
import com.seibel.lod.api.enums.config.EBlocksToAvoid;
import com.seibel.lod.api.enums.worldGeneration.EDhApiDistantGeneratorMode;
import com.seibel.lod.api.enums.config.EGenerationPriority;
@@ -52,14 +52,6 @@ public class DhApiWorldGenerationConfig implements IDhApiWorldGenerationConfig
public IDhApiConfigValue getDistantGeneratorMode()
{ return new DhApiConfigValue<>(WorldGenerator.distantGeneratorMode); }
- @Override
- public IDhApiConfigValue getLightingMode()
- { return new DhApiConfigValue<>(WorldGenerator.lightGenerationMode); }
-
- @Override
- public IDhApiConfigValue getGenerationPriority()
- { return new DhApiConfigValue<>(WorldGenerator.generationPriority); }
-
@Deprecated
@Override
public IDhApiConfigValue getBlocksToAvoid()
diff --git a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiBuffersConfig.java b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiBuffersConfig.java
index 46d5501a4..b1b33a9b3 100644
--- a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiBuffersConfig.java
+++ b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiBuffersConfig.java
@@ -22,7 +22,8 @@ package com.seibel.lod.core.api.external.methods.config.client;
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.interfaces.config.client.IDhApiBuffersConfig;
import com.seibel.lod.api.objects.config.DhApiConfigValue;
-import com.seibel.lod.core.config.Config.Client.Advanced.Buffers;
+import com.seibel.lod.core.config.Config;
+import com.seibel.lod.core.config.Config.Client.Advanced.GpuBuffers;
import com.seibel.lod.api.enums.config.EGpuUploadMethod;
/**
@@ -40,9 +41,9 @@ public class DhApiBuffersConfig implements IDhApiBuffersConfig
public IDhApiConfigValue getGpuUploadMethod()
- { return new DhApiConfigValue<>(Buffers.gpuUploadMethod); }
+ { return new DhApiConfigValue<>(Config.Client.Advanced.GpuBuffers.gpuUploadMethod); }
public IDhApiConfigValue getBufferUploadTimeoutPerMegabyteInMilliseconds()
- { return new DhApiConfigValue<>(Buffers.gpuUploadPerMegabyteInMilliseconds); }
+ { return new DhApiConfigValue<>(GpuBuffers.gpuUploadPerMegabyteInMilliseconds); }
}
diff --git a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiGraphicsConfig.java b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiGraphicsConfig.java
index ef9cc6e9f..6abc59fd2 100644
--- a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiGraphicsConfig.java
+++ b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiGraphicsConfig.java
@@ -26,9 +26,9 @@ import com.seibel.lod.api.objects.config.DhApiConfigValue;
import com.seibel.lod.coreapi.util.converters.RenderModeEnabledConverter;
import com.seibel.lod.core.config.Config;
import com.seibel.lod.api.enums.rendering.ERendererMode;
-import com.seibel.lod.core.config.Config.Client.Graphics.Quality;
+import com.seibel.lod.core.config.Config.Client.Advanced.Graphics.Quality;
import com.seibel.lod.core.config.Config.Client.Advanced.Debugging;
-import com.seibel.lod.core.config.Config.Client.Graphics.AdvancedGraphics;
+import com.seibel.lod.core.config.Config.Client.Advanced.Graphics.AdvancedGraphics;
/**
* Distant Horizons' graphics/rendering configuration.
@@ -78,9 +78,9 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig
public IDhApiConfigValue getHorizontalQualityDropoff()
{ return new DhApiConfigValue<>(Quality.horizontalQuality); }
- @Override
- public IDhApiConfigValue getBiomeBlending()
- { return new DhApiConfigValue<>(Quality.lodBiomeBlending); }
+// @Override
+// public IDhApiConfigValue getBiomeBlending()
+// { return new DhApiConfigValue<>(Quality.lodBiomeBlending); }
@@ -88,17 +88,9 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig
// advanced graphic settings //
//===========================//
- @Override
- public IDhApiConfigValue getDisableDirectionalCulling()
- { return new DhApiConfigValue<>(AdvancedGraphics.disableDirectionalCulling); }
-
- @Override
- public IDhApiConfigValue getVanillaOverdraw()
- { return new DhApiConfigValue<>(AdvancedGraphics.vanillaOverdraw); }
-
- @Override
- public IDhApiConfigValue getVanillaOverdrawOffset()
- { return new DhApiConfigValue<>(AdvancedGraphics.overdrawOffset); }
+// @Override
+// public IDhApiConfigValue getDisableDirectionalCulling()
+// { return new DhApiConfigValue<>(AdvancedGraphics.disableDirectionalCulling); }
@Override
public IDhApiConfigValue getUseExtendedNearClipPlane()
@@ -126,11 +118,7 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig
@Override
public IDhApiConfigValue getEnableLodOnlyMode()
- { return new DhApiConfigValue<>(Config.Client.Advanced.lodOnlyMode); }
-
- @Override
- public IDhApiConfigValue getGeometryRebuildFrequency()
- { return new DhApiConfigValue<>(Config.Client.Advanced.Buffers.rebuildTimes); }
+ { return new DhApiConfigValue<>(Debugging.lodOnlyMode); }
diff --git a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiGraphicsFogConfig.java b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiGraphicsFogConfig.java
index 98190a8c6..1f2210d45 100644
--- a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiGraphicsFogConfig.java
+++ b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiGraphicsFogConfig.java
@@ -23,7 +23,7 @@ import com.seibel.lod.api.enums.rendering.*;
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.interfaces.config.client.IDhApiGraphicsFogConfig;
import com.seibel.lod.api.objects.config.DhApiConfigValue;
-import com.seibel.lod.core.config.Config.Client.Graphics.FogQuality;
+import com.seibel.lod.core.config.Config.Client.Advanced.Graphics.Fog;
/**
* Distant Horizons' fog configuration.
@@ -49,19 +49,19 @@ public class DhApiGraphicsFogConfig implements IDhApiGraphicsFogConfig
@Override
public IDhApiConfigValue getFogDistance()
- { return new DhApiConfigValue<>(FogQuality.fogDistance); }
+ { return new DhApiConfigValue<>(Fog.fogDistance); }
@Override
public IDhApiConfigValue getFogRender()
- { return new DhApiConfigValue<>(FogQuality.fogDrawMode); }
+ { return new DhApiConfigValue<>(Fog.fogDrawMode); }
@Override
public IDhApiConfigValue getFogColor()
- { return new DhApiConfigValue<>(FogQuality.fogColorMode); }
+ { return new DhApiConfigValue<>(Fog.fogColorMode); }
@Override
public IDhApiConfigValue getDisableVanillaFog()
- { return new DhApiConfigValue<>(FogQuality.disableVanillaFog); }
+ { return new DhApiConfigValue<>(Fog.disableVanillaFog); }
//=======================//
@@ -70,27 +70,27 @@ public class DhApiGraphicsFogConfig implements IDhApiGraphicsFogConfig
@Override
public IDhApiConfigValue getFogStartDistance()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogStart); }
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.farFogStart); }
@Override
public IDhApiConfigValue getFogEndDistance()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogEnd); }
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.farFogEnd); }
@Override
public IDhApiConfigValue getFogMinThickness()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogMin); }
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.farFogMin); }
@Override
public IDhApiConfigValue getFogMaxThickness()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogMax); }
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.farFogMax); }
@Override
- public IDhApiConfigValue getFogFalloff()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogType); }
+ public IDhApiConfigValue getFarFogFalloff()
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.farFogFalloff); }
@Override
public IDhApiConfigValue getFogDensity()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogDensity); }
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.farFogDensity); }
//=====================//
@@ -99,38 +99,38 @@ public class DhApiGraphicsFogConfig implements IDhApiGraphicsFogConfig
@Override
public IDhApiConfigValue getHeightFogMixMode()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogMixMode); }
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogMixMode); }
@Override
public IDhApiConfigValue getHeightFogMode()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogMode); }
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogMode); }
@Override
public IDhApiConfigValue getHeightFogBaseHeight()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogHeight); }
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogHeight); }
@Override
public IDhApiConfigValue getHeightFogStartingHeightPercent()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogStart); }
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogStart); }
@Override
public IDhApiConfigValue getHeightFogEndingHeightPercent()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogEnd); }
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogEnd); }
@Override
public IDhApiConfigValue getHeightFogMinThickness()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogMin); }
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogMin); }
@Override
public IDhApiConfigValue getHeightFogMaxThickness()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogMax); }
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogMax); }
@Override
public IDhApiConfigValue getHeightFogFalloff()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogType); }
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogFalloff); }
@Override
public IDhApiConfigValue getHeightFogDensity()
- { return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogDensity); }
+ { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogDensity); }
}
diff --git a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiMultiplayerConfig.java b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiMultiplayerConfig.java
index 0f6765810..6cf1feac7 100644
--- a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiMultiplayerConfig.java
+++ b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiMultiplayerConfig.java
@@ -22,7 +22,7 @@ package com.seibel.lod.core.api.external.methods.config.client;
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.interfaces.config.client.IDhApiMultiplayerConfig;
import com.seibel.lod.api.objects.config.DhApiConfigValue;
-import com.seibel.lod.core.config.Config.Client.Multiplayer;
+import com.seibel.lod.core.config.Config.Client.Advanced.Multiplayer;
import com.seibel.lod.api.enums.config.EServerFolderNameMode;
/**
diff --git a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiThreadingConfig.java b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiThreadingConfig.java
index ff5531dc4..746f02083 100644
--- a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiThreadingConfig.java
+++ b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiThreadingConfig.java
@@ -22,7 +22,7 @@ package com.seibel.lod.core.api.external.methods.config.client;
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.interfaces.config.client.IDhApiThreadingConfig;
import com.seibel.lod.api.objects.config.DhApiConfigValue;
-import com.seibel.lod.core.config.Config.Client.Advanced.Threading;
+import com.seibel.lod.core.config.Config.Client.Advanced.MultiThreading;
/**
* Distant Horizons' threading configuration.
@@ -40,18 +40,18 @@ public class DhApiThreadingConfig implements IDhApiThreadingConfig
@Override
public IDhApiConfigValue getWorldGeneratorThread()
- { return new DhApiConfigValue<>(Threading.numberOfWorldGenerationThreads); }
+ { return new DhApiConfigValue<>(MultiThreading.numberOfWorldGenerationThreads); }
@Override
public IDhApiConfigValue getBufferBuilderThread()
- { return new DhApiConfigValue<>(Threading.numberOfBufferBuilderThreads); }
+ { return new DhApiConfigValue<>(MultiThreading.numberOfBufferBuilderThreads); }
@Override
public IDhApiConfigValue getFileHandlerThread()
- { return new DhApiConfigValue<>(Threading.numberOfFileHandlerThreads); }
+ { return new DhApiConfigValue<>(MultiThreading.numberOfFileHandlerThreads); }
@Override
public IDhApiConfigValue getDataConverterThread()
- { return new DhApiConfigValue<>(Threading.numberOfDataConverterThreads); }
+ { return new DhApiConfigValue<>(MultiThreading.numberOfDataConverterThreads); }
}
diff --git a/core/src/main/java/com/seibel/lod/core/config/Config.java b/core/src/main/java/com/seibel/lod/core/config/Config.java
index 1836cb902..8ae2b1ccc 100644
--- a/core/src/main/java/com/seibel/lod/core/config/Config.java
+++ b/core/src/main/java/com/seibel/lod/core/config/Config.java
@@ -21,26 +21,28 @@ package com.seibel.lod.core.config;
import com.seibel.lod.api.enums.config.*;
+import com.seibel.lod.api.enums.config.quickOptions.EQuickQuality;
+import com.seibel.lod.api.enums.config.quickOptions.EQuickThread;
import com.seibel.lod.api.enums.rendering.*;
import com.seibel.lod.api.enums.worldGeneration.EDhApiDistantGeneratorMode;
import com.seibel.lod.core.config.eventHandlers.RenderCacheConfigEventHandler;
import com.seibel.lod.core.config.types.*;
import com.seibel.lod.core.config.types.enums.*;
+import com.seibel.lod.coreapi.ModInfo;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* This handles any configuration the user has access to.
+ *
* @author coolGi
- * @version 04-29-2022
+ * @version 2023-6-7
*/
public class Config
{
+ // TODO update this diagram
// CONFIG STRUCTURE
// -> Client
// |
@@ -48,13 +50,13 @@ public class Config
// | |-> Quality
// | |-> FogQuality
// | |-> AdvancedGraphics
- // | |-> NoiseSettings
+ // | |-> NoiseTextureSettings
// |
// |-> World Generation
// |
// |-> Advanced
// |-> Threads
- // |-> Buffers
+ // |-> GpuBuffers
// |-> Debugging
// Since the original config system uses forge stuff, that means we have to rewrite the whole config system
@@ -64,691 +66,707 @@ public class Config
public static class Client
{
- public static ConfigCategory graphics = new ConfigCategory.Builder().set(Graphics.class).build();
-
- public static ConfigCategory worldGenerator = new ConfigCategory.Builder().set(WorldGenerator.class).build();
-
- public static ConfigCategory multiplayer = new ConfigCategory.Builder().set(Multiplayer.class).build();
-
- public static ConfigCategory advanced = new ConfigCategory.Builder().set(Advanced.class).build();
-
- public static ConfigCategory autoUpdater = new ConfigCategory.Builder().set(AutoUpdater.class).build();
-
- public static ConfigEntry optionsButton = new ConfigEntry.Builder()
- .set(true)
- .comment("Show the lod button in the options screen next to fov")
- .build();
-
-// public static ConfigEntry> testHashMap = new ConfigEntry.Builder>()
-// .set(new HashMap())
-// .build();
-
-
- public static class Graphics
- {
- public static ConfigCategory quality = new ConfigCategory.Builder().set(Quality.class).build();
-
- public static ConfigCategory fogQuality = new ConfigCategory.Builder().set(FogQuality.class).build();
-
- public static ConfigCategory advancedGraphics = new ConfigCategory.Builder().set(AdvancedGraphics.class).build();
-
-
- public static class Quality
- {
- public static ConfigEntry drawResolution = new ConfigEntry.Builder()
- .set(EHorizontalResolution.BLOCK)
- .comment(""
- + "What is the maximum detail fake chunks should be drawn at? \n"
- + "This setting will only affect closer chunks.\n"
- + "Higher settings will increase memory and GPU usage. \n"
- + "\n"
- + EHorizontalResolution.CHUNK + ": render 1 LOD for each Chunk. \n"
- + EHorizontalResolution.HALF_CHUNK + ": render 4 LODs for each Chunk. \n"
- + EHorizontalResolution.FOUR_BLOCKS + ": render 16 LODs for each Chunk. \n"
- + EHorizontalResolution.TWO_BLOCKS + ": render 64 LODs for each Chunk. \n"
- + EHorizontalResolution.BLOCK + ": render 256 LODs for each Chunk (width of one block). \n"
- + "\n"
- + "Lowest Quality: " + EHorizontalResolution.CHUNK + "\n"
- + "Highest Quality: " + EHorizontalResolution.BLOCK)
- .addListener(RenderCacheConfigEventHandler.INSTANCE)
- .build();
-
- public static ConfigEntry lodChunkRenderDistance = new ConfigEntry.Builder()
- .setMinDefaultMax(32, 128, 4096)
- .comment("The radius of the mod's render distance. (measured in chunks)")
- .build();
-
- public static ConfigEntry verticalQuality = new ConfigEntry.Builder()
- .set(EVerticalQuality.MEDIUM)
- .comment(""
- + "This indicates how detailed fake chunks will represent \n"
- + " overhangs, caves, floating islands, ect. \n"
- + "Higher options will make the world more accurate, but"
- + " will increase memory and GPU usage. \n"
- + "\n"
- + EVerticalQuality.LOW + ": uses at max 2 columns per position. \n"
- + EVerticalQuality.MEDIUM + ": uses at max 4 columns per position. \n"
- + EVerticalQuality.HIGH + ": uses at max 8 columns per position. \n"
- + "\n"
- + "Lowest Quality: " + EVerticalQuality.LOW + "\n"
- + "Highest Quality: " + EVerticalQuality.HIGH)
- .addListener(RenderCacheConfigEventHandler.INSTANCE)
- .build();
-
- public static ConfigEntry horizontalScale = new ConfigEntry.Builder()
- .setMinDefaultMax(2, 12, 64)
- .comment(""
- + "This indicates how quickly fake chunks decrease in quality the further away they are. \n"
- + "Higher settings will render higher quality fake chunks farther away, \n"
- + " but will increase memory and GPU usage.")
- .build();
-
- public static ConfigEntry horizontalQuality = new ConfigEntry.Builder()
- .set(EHorizontalQuality.MEDIUM)
- .comment(""
- + "This indicates how quickly fake chunks decrease in quality the further away they are. \n"
- + "Higher settings will render higher quality fake chunks farther away, \n"
- + " but will increase memory and GPU usage.")
- .build();
-
- public static ConfigEntry transparency = new ConfigEntry.Builder()
- .set(ETransparency.COMPLETE)
- .comment("")
- .build();
-
- public static ConfigEntry lodBiomeBlending = new ConfigEntry.Builder()
- .setMinDefaultMax(0,1,7)
- .comment(""
- + "This is the same as vanilla Biome Blending settings for Lod area. \n"
- + " Note that anything other than '0' will greatly effect Lod building time \n"
- + " and increase triangle count. The cost on chunk generation speed is also \n"
- + " quite large if set too high.\n"
- + "\n"
- + " '0' equals to Vanilla Biome Blending of '1x1' or 'OFF', \n"
- + " '1' equals to Vanilla Biome Blending of '3x3', \n"
- + " '2' equals to Vanilla Biome Blending of '5x5'...")
- .build();
- }
-
-
- public static class FogQuality
- {
- public static ConfigEntry fogDistance = new ConfigEntry.Builder()
- .set(EFogDistance.FAR)
- .comment("At what distance should Fog be drawn on the fake chunks?")
- .setPerformance(ConfigEntryPerformance.NONE)
- .build();
-
- public static ConfigEntry fogDrawMode = new ConfigEntry.Builder()
- .set(EFogDrawMode.FOG_ENABLED)
- .comment(""
- + "When should fog be drawn? \n"
- + "\n"
- + EFogDrawMode.USE_OPTIFINE_SETTING + ": Use whatever Fog setting Optifine is using.\n"
- + "If Optifine isn't installed this defaults to " + EFogDrawMode.FOG_ENABLED + ". \n"
- + EFogDrawMode.FOG_ENABLED + ": Never draw fog on the LODs \n"
- + EFogDrawMode.FOG_DISABLED + ": Always draw fast fog on the LODs \n"
- + "\n"
- + "Disabling fog will improve GPU performance.")
- .build();
-
- public static ConfigEntry fogColorMode = new ConfigEntry.Builder()
- .set(EFogColorMode.USE_WORLD_FOG_COLOR)
- .comment(""
- + "What color should fog use? \n"
- + "\n"
- + EFogColorMode.USE_WORLD_FOG_COLOR + ": Use the world's fog color. \n"
- + EFogColorMode.USE_SKY_COLOR + ": Use the sky's color. \n"
- + "\n"
- + "This setting doesn't affect performance.")
- .build();
-
- public static ConfigEntry disableVanillaFog = new ConfigEntry.Builder()
- .set(true)
- .comment(""
- + "If true disable Minecraft's fog. \n"
- + "\n"
- + "Experimental! Mod support is not guarantee.")
- .build();
-
- public static ConfigCategory advancedFog = new ConfigCategory.Builder().set(AdvancedFog.class).build();
-
-
- public static class AdvancedFog {
- // TODO: Make some of the option here floats rather than doubles (the ClassicConfigGUI doesnt support floats)
- private static final Double FOG_RANGE_MIN = 0.0;
- private static final Double FOG_RANGE_MAX = Math.sqrt(2.0);
-
- public static ConfigEntry farFogStart = new ConfigEntry.Builder()
- .setMinDefaultMax(FOG_RANGE_MIN, 0.0, FOG_RANGE_MAX)
- .comment(""
- + "Where should the far fog start? \n"
- + "\n"
- + " '0.0': Fog start at player's position.\n"
- + " '1.0': The fog-start's circle fit just in the lod render distance square.\n"
- + " '1.414': The lod render distance square fit just in the fog-start's circle.")
- .build();
-
- public static ConfigEntry farFogEnd = new ConfigEntry.Builder()
- .setMinDefaultMax(FOG_RANGE_MIN, 1.0, FOG_RANGE_MAX)
- .comment(""
- + "Where should the far fog end? \n"
- + "\n"
- + " '0.0': Fog end at player's position.\n"
- + " '1.0': The fog-end's circle fit just in the lod render distance square.\n"
- + " '1.414': The lod render distance square fit just in the fog-end's circle.")
- .build();
-
- public static ConfigEntry farFogMin = new ConfigEntry.Builder()
- .setMinDefaultMax(-5.0,0.0, FOG_RANGE_MAX)
- .comment(""
- + "What is the minimum fog thickness? \n"
- + "\n"
- + " '0.0': No fog at all.\n"
- + " '1.0': Fully fog color.")
- .build();
-
- public static ConfigEntry farFogMax = new ConfigEntry.Builder()
- .setMinDefaultMax(FOG_RANGE_MIN, 1.0, 5.0)
- .comment(""
- + "What is the maximum fog thickness? \n"
- + "\n"
- + " '0.0': No fog at all.\n"
- + " '1.0': Fully fog color.")
- .build();
-
- public static ConfigEntry farFogType = new ConfigEntry.Builder()
- .set(EFogFalloff.EXPONENTIAL_SQUARED)
- .comment(""
- + "How should the fog thickness should be calculated? \n"
- + "\n"
- + EFogFalloff.LINEAR + ": Linear based on distance (will ignore 'density')\n"
- + EFogFalloff.EXPONENTIAL + ": 1/(e^(distance*density)) \n"
- + EFogFalloff.EXPONENTIAL_SQUARED + ": 1/(e^((distance*density)^2)")
- .build();
-
- public static ConfigEntry farFogDensity = new ConfigEntry.Builder()
- .setMinDefaultMax(0.01,2.5, 50.0)
- .comment("What is the fog density?")
- .build();
-
- public static ConfigCategory heightFog = new ConfigCategory.Builder().set(HeightFog.class).build();
-
-
- public static class HeightFog {
- public static ConfigEntry heightFogMixMode = new ConfigEntry.Builder()
- .set(EHeightFogMixMode.BASIC)
- .comment(""
- + "How the height should effect the fog thickness combined with the normal function? \n"
- + "\n"
- + EHeightFogMixMode.BASIC + ": No special height fog effect. Fog is calculated based on camera distance \n"
- + EHeightFogMixMode.IGNORE_HEIGHT + ": Ignore height completely. Fog is calculated based on horizontal distance \n"
- + EHeightFogMixMode.ADDITION + ": heightFog + farFog \n"
- + EHeightFogMixMode.MAX + ": max(heightFog, farFog) \n"
- + EHeightFogMixMode.MULTIPLY + ": heightFog * farFog \n"
- + EHeightFogMixMode.INVERSE_MULTIPLY + ": 1 - (1-heightFog) * (1-farFog) \n"
- + EHeightFogMixMode.LIMITED_ADDITION + ": farFog + max(farFog, heightFog) \n"
- + EHeightFogMixMode.MULTIPLY_ADDITION + ": farFog + farFog * heightFog \n"
- + EHeightFogMixMode.INVERSE_MULTIPLY_ADDITION + ": farFog + 1 - (1-heightFog) * (1-farFog) \n"
- + EHeightFogMixMode.AVERAGE + ": farFog*0.5 + heightFog*0.5 \n"
- + "\n"
- + "Note that for 'BASIC' mode and 'IGNORE_HEIGHT' mode, fog settings for height fog has no effect.")
- .build();
-
- public static ConfigEntry heightFogMode = new ConfigEntry.Builder()
- .set(EHeightFogMode.ABOVE_AND_BELOW_CAMERA)
- .comment(""
- + "Where should the height fog be located? \n"
- + "\n"
- + EHeightFogMode.ABOVE_CAMERA + ": Height fog starts from camera to the sky \n"
- + EHeightFogMode.BELOW_CAMERA + ": Height fog starts from camera to the void \n"
- + EHeightFogMode.ABOVE_AND_BELOW_CAMERA + ": Height fog starts from camera to both the sky and the void \n"
- + EHeightFogMode.ABOVE_SET_HEIGHT + ": Height fog starts from a set height to the sky \n"
- + EHeightFogMode.BELOW_SET_HEIGHT + ": Height fog starts from a set height to the void \n"
- + EHeightFogMode.ABOVE_AND_BELOW_SET_HEIGHT + ": Height fog starts from a set height to both the sky and the void")
- .build();
-
- public static ConfigEntry heightFogHeight = new ConfigEntry.Builder()
- .setMinDefaultMax(-4096.0, 70.0, 4096.0)
- .comment("If the height fog is calculated around a set height, what is that height position?")
- .build();
-
- public static ConfigEntry heightFogStart = new ConfigEntry.Builder()
- .setMinDefaultMax(FOG_RANGE_MIN, 0.0, FOG_RANGE_MAX)
- .comment(""
- + "How far the start of height fog should offset? \n"
- + "\n"
- + " '0.0': Fog start with no offset.\n"
- + " '1.0': Fog start with offset of the entire world's height. (Include depth)")
- .build();
-
- public static ConfigEntry heightFogEnd = new ConfigEntry.Builder()
- .setMinDefaultMax(FOG_RANGE_MIN, 1.0, FOG_RANGE_MAX)
- .comment(""
- + "How far the end of height fog should offset? \n"
- + "\n"
- + " '0.0': Fog end with no offset.\n"
- + " '1.0': Fog end with offset of the entire world's height. (Include depth)")
- .build();
-
- public static ConfigEntry heightFogMin = new ConfigEntry.Builder()
- .setMinDefaultMax(-5.0, 0.0, FOG_RANGE_MAX)
- .comment(""
- + "What is the minimum fog thickness? \n"
- + "\n"
- + " '0.0': No fog at all.\n"
- + " '1.0': Fully fog color.")
- .build();
-
- public static ConfigEntry heightFogMax = new ConfigEntry.Builder()
- .setMinDefaultMax(FOG_RANGE_MIN, 1.0, 5.0)
- .comment(""
- + "What is the maximum fog thickness? \n"
- + "\n"
- + " '0.0': No fog at all.\n"
- + " '1.0': Fully fog color.")
- .build();
-
- public static ConfigEntry heightFogType = new ConfigEntry.Builder()
- .set(EFogFalloff.EXPONENTIAL_SQUARED)
- .comment(""
- + "How the fog thickness should be calculated from height? \n"
- + "\n"
- + EFogFalloff.LINEAR + ": Linear based on height (will ignore 'density')\n"
- + EFogFalloff.EXPONENTIAL + ": 1/(e^(height*density)) \n"
- + EFogFalloff.EXPONENTIAL_SQUARED + ": 1/(e^((height*density)^2)")
- .build();
-
- public static ConfigEntry heightFogDensity = new ConfigEntry.Builder()
- .setMinDefaultMax(0.01, 2.5, 50.0)
- .comment("What is the fog density?")
- .build();
-
- }
- }
- }
-
-
- public static class AdvancedGraphics
- {
- public static ConfigEntry disableDirectionalCulling = new ConfigEntry.Builder()
- .set(false)
- .comment(""
- + "If false fake chunks behind the player's camera \n"
- + " aren't drawn, increasing GPU performance. \n"
- + "\n"
- + "If true all LODs are drawn, even those behind \n"
- + " the player's camera, decreasing GPU performance. \n"
- + "\n"
- + "Disable this if you see LODs disappearing at the corners of your vision.")
- .build();
-
- public static ConfigEntry vanillaOverdraw = new ConfigEntry.Builder()
- .set(EVanillaOverdraw.ALWAYS)
- .comment(""
- + " How often should LODs be drawn on top of regular chunks? \n"
- + " ALWAYS will prevent holes in the world, \n"
- + " but may look odd for transparent blocks or in caves. \n"
- + "\n"
- + EVanillaOverdraw.NEVER + ": \n"
- + " LODs won't render on top of vanilla chunks. Use Overdraw offset to change the border offset. \n"
- + EVanillaOverdraw.DYNAMIC + ": \n"
- + " LODs will render on top of distant vanilla chunks to hide delayed loading. \n"
- + " Will dynamically decide the border offset based on vanilla render distance. \n"
- + EVanillaOverdraw.ALWAYS + ": \n"
- + " LODs will render on all vanilla chunks preventing all holes in the world.")
- .setPerformance(ConfigEntryPerformance.NONE)
- .build();
-
- public static ConfigEntry overdrawOffset = new ConfigEntry.Builder()
- .setMinDefaultMax(-16, 0, 16)
- .comment(""
- + "If on Vanilla Overdraw mode of NEVER, how much should should the border be offset? \n"
- + "\n"
- + " '1': The start of lods will be shifted inwards by 1 chunk, causing 1 chunk of overdraw. \n"
- + " '-1': The start fo lods will be shifted outwards by 1 chunk, causing 1 chunk of gap. \n"
- + "\n"
- + "This setting can be used to deal with gaps due to our vanilla rendered chunk \n"
- + " detection not being perfect.")
- .build();
-
- public static ConfigEntry useExtendedNearClipPlane = new ConfigEntry.Builder()
- .set(true)
- .comment(""
- + "Will prevent some overdraw issues, but may cause nearby fake chunks to render incorrectly \n"
- + " especially when in/near an ocean.")
- .setPerformance(ConfigEntryPerformance.NONE)
- .build();
-
- public static ConfigEntry brightnessMultiplier = new ConfigEntry.Builder() // TODO: Make this a float (the ClassicConfigGUI doesnt support floats)
- .set(1.0)
- .comment(""
- + "How bright fake chunk colors are. \n"
- + "\n"
- + " 0 = black \n"
- + " 1 = normal \n"
- + " 2 = near white")
- .build();
-
- public static ConfigEntry saturationMultiplier = new ConfigEntry.Builder() // TODO: Make this a float (the ClassicConfigGUI doesnt support floats)
- .set(1.0)
- .comment(""
- + "How saturated fake chunk colors are. \n"
- + "\n"
- + " 0 = black and white \n"
- + " 1 = normal \n"
- + " 2 = very saturated")
- .build();
-
- public static ConfigEntry enableCaveCulling = new ConfigEntry.Builder()
- .set(true)
- .comment(""
- + "If enabled caves will be culled \n"
- + "\n"
- + "NOTE: This feature is under development and \n"
- + " it is VERY experimental! Please don't report \n"
- + " any issues related to this feature. \n"
- + "\n"
- + "Additional Info: Currently this cull all faces \n"
- + " with skylight value of 0 in dimensions that \n"
- + " does not have a ceiling.")
- .build();
-
- public static ConfigEntry caveCullingHeight = new ConfigEntry.Builder()
- .setMinDefaultMax(-4096,40,4096)
- .comment("At what Y value should cave culling start?")
- .build();
-
- public static ConfigEntry earthCurveRatio = new ConfigEntry.Builder()
- .setMinDefaultMax(0,0,5000)
- .comment(""
- + "This is the earth size ratio when applying the curvature shader effect. \n"
- + "\n"
- + "NOTE: This feature is just for fun and is VERY experimental! \n"
- + "Please don't report any issues related to this feature. \n"
- + "\n"
- + " 0 = flat/disabled \n"
- + " 1 = 1 to 1 (6,371,000 blocks) \n"
- + " 100 = 1 to 100 (63,710 blocks) \n"
- + " 10000 = 1 to 10000 (637.1 blocks) \n"
- + "\n"
- + "NOTE: Due to current limitations, the min value is 50 \n"
- + " and the max value is 5000. Any values outside this range \n"
- + " will be set to 0(disabled).")
- .build();
-
- public static ConfigEntry lodBias = new ConfigEntry.Builder() // TODO: Make this a float (the ClassicConfigGUI doesnt support floats)
- .setMinDefaultMax(0d, 0d, null)
- .comment(""
- + "What the value of vanilla's LodBias should be \n"
- + "If set to 0 the mod wont overwrite vanilla's default (which so happens to also be 0)")
- .build();
-
-
-
-
- public static ConfigCategory noiseSettings = new ConfigCategory.Builder().set(NoiseSettings.class).build();
-
-
- public static class NoiseSettings
- {
- public static ConfigEntry noiseEnable = new ConfigEntry.Builder()
- .set(true)
- .comment("If noise on the lod's should be enabled")
- .build();
-
- public static ConfigEntry noiseSteps = new ConfigEntry.Builder()
- .setMinDefaultMax(0, 4, null)
- .comment("How many steps of noise should be on each block")
- .build();
-
- public static ConfigEntry noiseIntensity = new ConfigEntry.Builder() // TODO: Make this a float (the ClassicConfigGUI doesnt support floats)
- .setMinDefaultMax(0d, 10d, 100d) // TODO: Once this becomes a float make it 0-1 instead of 0-100 (I did this cus doubles only allow 2 decimal places)
- .comment("How intense the noise should be")
- .build();
-
- public static ConfigEntry noiseDropoff = new ConfigEntry.Builder() // TODO: Make this a float (the ClassicConfigGUI doesnt support floats)
- .setMinDefaultMax(0d, 3d, null)
- .comment(""
- + "How fast the noise should drop off to no noise based upon your lod render distance \n"
- + "Eg, if you set it to 3, then the noise effect would completely go away after 1/3 of your render distance")
- .build();
- }
- }
- }
-
-
- public static class WorldGenerator
- {
- public static ConfigEntry enableDistantGeneration = new ConfigEntry.Builder()
- .set(true)
- .comment(""
- + "Whether to enable Distant chunks generator? \n"
- + "\n"
- + "Turning this on allows Distant Horizons to make lods for chunks \n"
- + " that are outside of vanilla view distance. \n"
- + "\n"
- + "Note that in server, distant generation is always off.")
- .build();
-
- public static ConfigEntry distantGeneratorMode = new ConfigEntry.Builder()
- .set(EDhApiDistantGeneratorMode.FEATURES)
- .comment(""
- + "How detailed should fake chunks be generated outside the vanilla render distance? \n"
- + "\n"
- + "The times are the amount of time it took one of the developer's PC to generate \n"
- + " one chunk in Minecraft 1.16.5 and may be inaccurate for different Minecraft versions. \n"
- + "They are included to give a rough estimate as to how the different options \n"
- + " may perform in comparison to each other. \n"
- + "(Note that all modes will load in pre-existing chunks) \n"
- + "\n"
- + EDhApiDistantGeneratorMode.PRE_EXISTING_ONLY + " \n"
- + "Only create LOD data for already generated chunks. \n"
- + "\n"
- + EDhApiDistantGeneratorMode.BIOME_ONLY + " \n"
- + "Only generate the biomes and use the biome's \n"
- + " grass color, water color, or snow color. \n"
- + "Doesn't generate height, everything is shown at sea level. \n"
- + " - Fastest (2-5 ms) \n"
- + "\n"
- + EDhApiDistantGeneratorMode.BIOME_ONLY_SIMULATE_HEIGHT + " \n"
- + "Same as " + EDhApiDistantGeneratorMode.BIOME_ONLY + ", except instead \n"
- + " of always using sea level as the LOD height \n"
- + " different biome types (mountain, ocean, forest, etc.) \n"
- + " use predetermined heights to simulate having height data. \n"
- + " - Fastest (2-5 ms) \n"
- + "\n"
- + EDhApiDistantGeneratorMode.SURFACE + " \n"
- + "Generate the world surface, \n"
- + " this does NOT include trees, \n"
- + " or structures. \n"
- + " - Faster (10-20 ms) \n"
- + "\n"
- + EDhApiDistantGeneratorMode.FEATURES + " \n"
- + "Generate everything except structures. \n"
- + "WARNING: This may cause world generation bugs or instability! \n"
- + " - Fast (15-20 ms) \n"
- + "\n"
- + EDhApiDistantGeneratorMode.FULL + " \n"
- + "Ask the local server to generate/load each chunk. \n"
- + "This will show player made structures, which can \n"
- + " be useful if you are adding the mod to a pre-existing world. \n"
- + "This is the most compatible, but causes server/simulation lag. \n"
- + " - Slow (15-50 ms, with spikes up to 200 ms) \n"
- + "\n"
- + "The multithreaded options may increase CPU load significantly (while generating) \n"
- + " depending on how many world generation threads you have allocated.")
- .build();
-
- public static ConfigEntry lightGenerationMode = new ConfigEntry.Builder()
- .set(ELightGenerationMode.FANCY)
- .comment(""
- + "How should block and sky lights be processed for distant generation? \n"
- + "\n"
- + "Note that this include already existing chunks since vanilla \n"
- + " does not store sky light values to save file. \n"
- + "\n"
- + ELightGenerationMode.FAST + ": Use height map to fake the light values. \n"
- + ELightGenerationMode.FANCY + ": Use actaul light engines to generate proper values. \n"
- + "\n"
- + "This will effect generation speed, but not the rendering performance.")
- .build();
-
- public static ConfigEntry generationPriority = new ConfigEntry.Builder()
- .set(EGenerationPriority.NEAR_FIRST)
- .comment(""
- + "In what priority should fake chunks be generated outside the vanilla render distance? \n"
- + "\n"
- + EGenerationPriority.FAR_FIRST + " \n"
- + "Fake chunks are generated from lowest to highest detail \n"
- + " with a priority for far away regions. \n"
- + "This fills in the world fastest, but you will have large low detail \n"
- + " blocks for a while while the generation happens. \n"
- + "\n"
- + EGenerationPriority.NEAR_FIRST + " \n"
- + "Fake chunks are generated around the player \n"
- + " in a spiral, similar to vanilla minecraft. \n"
- + "Best used when on a server since we can't generate \n"
- + " fake chunks. \n"
- + "\n"
- + EGenerationPriority.BALANCED + " \n"
- + "A mix between "+ EGenerationPriority.NEAR_FIRST+"and"+ EGenerationPriority.FAR_FIRST+". \n"
- + "First prioritise completing nearby highest detail chunks, \n"
- + " then focus on filling in the low detail areas away from the player. \n"
- + "\n"
- + EGenerationPriority.AUTO + " \n"
- + "Uses " + EGenerationPriority.BALANCED + " when on a single player world \n"
- + " and " + EGenerationPriority.NEAR_FIRST + " when connected to a server.")
- .setPerformance(ConfigEntryPerformance.NONE)
- .build();
-
- public static ConfigEntry blocksToAvoid = new ConfigEntry.Builder()
- .set(EBlocksToAvoid.BOTH)
- .comment(""
- + "When generating fake chunks, what blocks should be ignored? \n"
- + "Ignored blocks don't affect the height of the fake chunk, but might affect the color. \n"
- + "So using " + EBlocksToAvoid.BOTH + " will prevent snow covered blocks from appearing one block too tall, \n"
- + " but will still show the snow's color.\n"
- + "\n"
- + EBlocksToAvoid.NONE + ": Use all blocks when generating fake chunks \n"
- + EBlocksToAvoid.NON_FULL + ": Only use full blocks when generating fake chunks (ignores slabs, lanterns, torches, tall grass, etc.) \n"
- + EBlocksToAvoid.NO_COLLISION + ": Only use solid blocks when generating fake chunks (ignores tall grass, torches, etc.) \n"
- + EBlocksToAvoid.BOTH + ": Only use full solid blocks when generating fake chunks")
- .setPerformance(ConfigEntryPerformance.NONE)
- .build();
-
- public static ConfigEntry tintWithAvoidedBlocks = new ConfigEntry.Builder()
- .set(true)
- .comment(""
- + "Should the blocks underneath avoided blocks gain the color of the avoided block? \n"
- + " True: a red flower on grass will tint the grass below it red"
- + " False: skipped blocks will not change color of surface below them")
- .build();
- }
-
-
- public static class Multiplayer
- {
- public static ConfigEntry serverFolderNameMode = new ConfigEntry.Builder()
- .set(EServerFolderNameMode.AUTO)
- .comment(""
- + " What multiplayer save folders should be named. \n"
- + "\n"
- + " " + EServerFolderNameMode.AUTO + ": Defaults to " + EServerFolderNameMode.NAME_ONLY + " for both standard multiplayer and LAN. \n"
- + " " + EServerFolderNameMode.NAME_ONLY + ": Example: \"Minecraft Server\" \n"
- + " " + EServerFolderNameMode.NAME_IP + ": Example: \"Minecraft Server IP 192.168.1.40\" \n"
- + " " + EServerFolderNameMode.NAME_IP_PORT + ": Example: \"Minecraft Server IP 192.168.1.40:25565\""
- + " " + EServerFolderNameMode.NAME_IP_PORT_MC_VERSION + ": Example: \"Minecraft Server IP 192.168.1.40:25565 GameVersion 1.16.5\"")
- .build();
-
- public static ConfigEntry multiDimensionRequiredSimilarity = new ConfigEntry.Builder()
- .setMinDefaultMax(0.0, 0.0, 1.0)
- .comment(""
- + "When matching worlds of the same dimension type the \n"
- + " tested chunks must be at least this percent the same \n"
- + " in order to be considered the same world. \n"
- + "\n"
- + "Note: If you use portals to enter a dimension at two \n"
- + " different locations this system may think it is two different worlds. \n"
- + "\n"
- + " 1.0 (100%) the chunks must be identical. \n"
- + " 0.5 (50%) the chunks must be half the same. \n"
- + " 0.0 (0%) disables multi-dimension support, \n"
- + " only one world will be used per dimension.")
- .build();
-
- }
-
-
- public static class Advanced
- {
- public static ConfigCategory threading = new ConfigCategory.Builder().set(Threading.class).build();
-
- public static ConfigCategory debugging = new ConfigCategory.Builder().set(Debugging.class).build();
-
- public static ConfigCategory buffers = new ConfigCategory.Builder().set(Buffers.class).build();
-
- public static ConfigEntry lodOnlyMode = new ConfigEntry.Builder()
- .set(false)
- .comment(""
- + " Due to some demand for playing without vanilla terrain, \n"
- + " we decided to add this mode for fun. \n"
- + "\n"
- + " NOTE: Do not report any issues when this mode is on! \n"
- + " This setting is only for fun, and mod \n"
- + " compatibility is not guaranteed.")
- .build();
-
-
- public static class Threading
- {
- public static final String THREAD_NOTE = ""
- + " Note: \n"
- + " If the total thread count in this config is more threads than your CPU has cores, \n"
- + " CPU performance may suffer if Distant Horizons has a lot to load or generate. \n"
- + " This can be an issue when first loading into a world, when flying, and/or when generating new terrain.";
+ // TODO modify debugging.rendererMode
+ public static ConfigEntry quickEnableRendering = new ConfigEntry.Builder()
+ .set(true)
+ .comment(""
+ + "If true, Distant Horizons will render LODs beyond the vanilla render distance."
+ + "")
+ .setAppearance(ConfigEntryAppearance.ONLY_IN_GUI) // TODO set when the game boots
+ //.addListener(null) // TODO add listener
+ .build();
+
+ public static ConfigLinkedEntry quickLodChunkRenderDistance = new ConfigLinkedEntry(Advanced.Graphics.Quality.lodChunkRenderDistance);
+
+ public static ConfigEntry quickQualitySetting = new ConfigEntry.Builder()
+ .set(EQuickQuality.MEDIUM)
+ .comment(""
+ + "Changing this setting will modify a number of different settings that will change the \n"
+ + "visual fidelity of the rendered LODs.\n"
+ + "\n"
+ + "Higher settings will improve the graphical quality while increasing GPU and memory use.\n"
+ + "")
+ .setAppearance(ConfigEntryAppearance.ONLY_IN_GUI) // TODO set when the game boots
+ //.addListener(null) // TODO add listener
+ .build();
+
+ public static ConfigEntry quickThreadSetting = new ConfigEntry.Builder()
+ .set(EQuickThread.BALANCED)
+ .comment(""
+ + "Changing this setting will modify a number of different settings that will change \n"
+ + "the load that Distant Horizons is allowed to put on your CPU. \n"
+ + "\n"
+ + "Higher options will improve LOD generation and loading speed, \n"
+ + "but will increase CPU load and may introduce stuttering.\n"
+ + "")
+ .setAppearance(ConfigEntryAppearance.ONLY_IN_GUI) // TODO set when the game boots
+ //.addListener(null) // TODO add listener
+ .build();
+
+ public static ConfigLinkedEntry quickEnableWorldGenerator = new ConfigLinkedEntry(Advanced.WorldGenerator.enableDistantGeneration);
+
+ public static ConfigEntry optionsButton = new ConfigEntry.Builder()
+ .set(true)
+ .comment("" +
+ "Should Distant Horizon's config button appear in the options screen next to fov slider?")
+ .build();
+
+
+
+ public static ConfigCategory advanced = new ConfigCategory.Builder().set(Advanced.class).build();
+
+ public static class Advanced
+ {
+ public static ConfigUIComment advancedConfigScreenNote = new ConfigUIComment();
+
+ public static ConfigCategory graphics = new ConfigCategory.Builder().set(Graphics.class).build();
+ public static ConfigCategory worldGenerator = new ConfigCategory.Builder().set(WorldGenerator.class).build();
+ public static ConfigCategory multiplayer = new ConfigCategory.Builder().set(Multiplayer.class).build();
+ public static ConfigCategory threading = new ConfigCategory.Builder().set(MultiThreading.class).build();
+ public static ConfigCategory buffers = new ConfigCategory.Builder().set(GpuBuffers.class).build();
+ public static ConfigCategory autoUpdater = new ConfigCategory.Builder().set(AutoUpdater.class).build();
+
+ public static ConfigCategory logging = new ConfigCategory.Builder().set(Logging.class).build();
+ public static ConfigCategory debugging = new ConfigCategory.Builder().set(Debugging.class).build();
+
+
+ public static class Graphics
+ {
+ public static ConfigCategory quality = new ConfigCategory.Builder().set(Quality.class).build();
+ public static ConfigCategory fog = new ConfigCategory.Builder().set(Fog.class).build();
+ public static ConfigCategory noiseTextureSettings = new ConfigCategory.Builder().set(NoiseTextureSettings.class).build();
+ public static ConfigCategory advancedGraphics = new ConfigCategory.Builder().set(AdvancedGraphics.class).build();
- public static final ConfigEntry numberOfWorldGenerationThreads = new ConfigEntry.Builder()
- .setMinDefaultMax(1,
- Runtime.getRuntime().availableProcessors()/6,
- Runtime.getRuntime().availableProcessors())
- .comment(""
- + " How many threads should be used when generating LOD \n"
- + " chunks outside the normal render distance? \n"
- + "\n"
- + " If you experience stuttering when generating distant LODs, \n"
- + " decrease this number. \n"
- + " If you want to increase LOD \n"
- + " generation speed, increase this number. \n"
- + "\n"
- + THREAD_NOTE)
- .build();
-
- public static ConfigEntry numberOfBufferBuilderThreads = new ConfigEntry.Builder()
- .setMinDefaultMax(1,
- Runtime.getRuntime().availableProcessors()/4,
- Runtime.getRuntime().availableProcessors())
- .comment(""
- + "How many threads are used when building geometry data? \n"
- + "\n"
- + " If you experience high CPU usage when NOT generating distant \n"
- + " fake chunks, lower this number. A higher number will make fake\n"
- + " fake chunks' transition faster when moving around the world. \n"
- + "\n"
+ public static class Quality
+ {
+ public static ConfigEntry drawResolution = new ConfigEntry.Builder()
+ .set(EHorizontalResolution.BLOCK)
+ .comment(""
+ + "What is the maximum detail LODs should be drawn at? \n"
+ + "Higher settings will increase memory and GPU usage. \n"
+ + "\n"
+ + EHorizontalResolution.CHUNK + ": render 1 LOD for each Chunk. \n"
+ + EHorizontalResolution.HALF_CHUNK + ": render 4 LODs for each Chunk. \n"
+ + EHorizontalResolution.FOUR_BLOCKS + ": render 16 LODs for each Chunk. \n"
+ + EHorizontalResolution.TWO_BLOCKS + ": render 64 LODs for each Chunk. \n"
+ + EHorizontalResolution.BLOCK + ": render 256 LODs for each Chunk (width of one block). \n"
+ + "\n"
+ + "Lowest Quality: " + EHorizontalResolution.CHUNK + "\n"
+ + "Highest Quality: " + EHorizontalResolution.BLOCK)
+ .addListener(RenderCacheConfigEventHandler.INSTANCE)
+ .setPerformance(ConfigEntryPerformance.MEDIUM)
+ .build();
+
+ public static ConfigEntry lodChunkRenderDistance = new ConfigEntry.Builder()
+ .setMinDefaultMax(32, 128, 4096)
+ .comment("The radius of the mod's render distance. (measured in chunks)")
+ .setPerformance(ConfigEntryPerformance.HIGH)
+ .build();
+
+ public static ConfigEntry verticalQuality = new ConfigEntry.Builder()
+ .set(EVerticalQuality.MEDIUM)
+ .comment(""
+ + "This indicates how well LODs will represent \n"
+ + "overhangs, caves, floating islands, etc. \n"
+ + "Higher options will make the world more accurate, but"
+ + "will increase memory and GPU usage. \n"
+ + "\n"
+ + "Lowest Quality: " + EVerticalQuality.HEIGHT_MAP + "\n"
+ + "Highest Quality: " + EVerticalQuality.ULTRA)
+ .setPerformance(ConfigEntryPerformance.VERY_HIGH)
+ .addListener(RenderCacheConfigEventHandler.INSTANCE)
+ .build();
+
+ // TODO merge with horizontal quality
+ public static ConfigEntry horizontalScale = new ConfigEntry.Builder()
+ .setMinDefaultMax(2, 12, 64)
+ .comment(""
+ + "This indicates how quickly fake chunks decrease in quality the further away they are. \n"
+ + "Higher settings will render higher quality fake chunks farther away, \n"
+ + " but will increase memory and GPU usage.")
+ .build();
+
+ public static ConfigEntry horizontalQuality = new ConfigEntry.Builder()
+ .set(EHorizontalQuality.MEDIUM)
+ .comment(""
+ + "This indicates how quickly LODs decrease in quality the further away they are. \n"
+ + "Higher settings will render higher quality fake chunks farther away, \n"
+ + "but will increase memory and GPU usage.")
+ .setPerformance(ConfigEntryPerformance.MEDIUM)
+ .build();
+
+ public static ConfigEntry transparency = new ConfigEntry.Builder()
+ .set(ETransparency.COMPLETE)
+ .comment(""
+ + "How should LOD transparency be handled. \n"
+ + "\n"
+ + ETransparency.COMPLETE + ": LODs will render transparent. \n"
+ + ETransparency.FAKE + ": LODs will be opaque, but shaded to match the blocks underneath. \n"
+ + ETransparency.DISABLED + ": LODs will be opaque. \n"
+ + "")
+ .setPerformance(ConfigEntryPerformance.MEDIUM)
+ .build();
+
+ // TODO fixme
+// public static ConfigEntry lodBiomeBlending = new ConfigEntry.Builder()
+// .setMinDefaultMax(0,1,7)
+// .comment(""
+// + "This is the same as vanilla Biome Blending settings for Lod area. \n"
+// + " Note that anything other than '0' will greatly effect Lod building time \n"
+// + " and increase triangle count. The cost on chunk generation speed is also \n"
+// + " quite large if set too high.\n"
+// + "\n"
+// + " '0' equals to Vanilla Biome Blending of '1x1' or 'OFF', \n"
+// + " '1' equals to Vanilla Biome Blending of '3x3', \n"
+// + " '2' equals to Vanilla Biome Blending of '5x5'...")
+// .build();
+ }
+
+ public static class Fog
+ {
+ public static ConfigEntry fogDistance = new ConfigEntry.Builder()
+ .set(EFogDistance.FAR)
+ .comment("At what distance should Fog be drawn on the LODs?")
+ .setPerformance(ConfigEntryPerformance.NONE)
+ .build();
+
+ public static ConfigEntry fogDrawMode = new ConfigEntry.Builder()
+ .set(EFogDrawMode.FOG_ENABLED)
+ .comment(""
+ + "When should fog be drawn? \n"
+ + "\n"
+ + EFogDrawMode.USE_OPTIFINE_SETTING + ": Use whatever Fog setting Optifine is using.\n"
+ + "If Optifine isn't installed this defaults to " + EFogDrawMode.FOG_ENABLED + ". \n"
+ + EFogDrawMode.FOG_ENABLED + ": Never draw fog on the LODs \n"
+ + EFogDrawMode.FOG_DISABLED + ": Always draw fast fog on the LODs \n"
+ + "\n"
+ + "Disabling fog will improve GPU performance.")
+ .setPerformance(ConfigEntryPerformance.VERY_LOW)
+ .build();
+
+ public static ConfigEntry fogColorMode = new ConfigEntry.Builder()
+ .set(EFogColorMode.USE_WORLD_FOG_COLOR)
+ .comment(""
+ + "What color should fog use? \n"
+ + "\n"
+ + EFogColorMode.USE_WORLD_FOG_COLOR + ": Use the world's fog color. \n"
+ + EFogColorMode.USE_SKY_COLOR + ": Use the sky's color.")
+ .setPerformance(ConfigEntryPerformance.NONE)
+ .build();
+
+ public static ConfigEntry disableVanillaFog = new ConfigEntry.Builder()
+ .set(true)
+ .comment(""
+ + "Should Minecraft's fog be disabled? \n"
+ + "\n"
+ + "Note: Other mods may conflict with this setting.")
+ .build();
+
+
+
+ public static ConfigCategory advancedFog = new ConfigCategory.Builder().set(AdvancedFog.class).build();
+
+
+ public static class AdvancedFog
+ {
+ private static final Double FOG_RANGE_MIN = 0.0;
+ private static final Double FOG_RANGE_MAX = Math.sqrt(2.0);
+
+ public static ConfigEntry farFogStart = new ConfigEntry.Builder()
+ .setMinDefaultMax(FOG_RANGE_MIN, 0.0, FOG_RANGE_MAX)
+ .comment(""
+ + "At what distance should the far fog start? \n"
+ + "\n"
+ + "0.0: Fog starts at the player's position. \n"
+ + "1.0: Fog starts at the closest edge of the vanilla render distance. \n"
+ + "1.414: Fog starts at the corner of the vanilla render distance.")
+ .build();
+
+ public static ConfigEntry farFogEnd = new ConfigEntry.Builder()
+ .setMinDefaultMax(FOG_RANGE_MIN, 1.0, FOG_RANGE_MAX)
+ .comment(""
+ + "Where should the far fog end? \n"
+ + "\n"
+ + "0.0: Fog ends at player's position.\n"
+ + "1.0: Fog ends at the closest edge of the vanilla render distance. \n"
+ + "1.414: Fog ends at the corner of the vanilla render distance.")
+ .build();
+
+ public static ConfigEntry farFogMin = new ConfigEntry.Builder()
+ .setMinDefaultMax(-5.0,0.0, FOG_RANGE_MAX)
+ .comment(""
+ + "What is the minimum fog thickness? \n"
+ + "\n"
+ + "0.0: No fog. \n"
+ + "1.0: Fully opaque fog.")
+ .build();
+
+ public static ConfigEntry farFogMax = new ConfigEntry.Builder()
+ .setMinDefaultMax(FOG_RANGE_MIN, 1.0, 5.0)
+ .comment(""
+ + "What is the maximum fog thickness? \n"
+ + "\n"
+ + "0.0: No fog. \n"
+ + "1.0: Fully opaque fog.")
+ .build();
+
+ public static ConfigEntry farFogFalloff = new ConfigEntry.Builder()
+ .set(EFogFalloff.EXPONENTIAL_SQUARED)
+ .comment(""
+ + "How should the fog thickness should be calculated? \n"
+ + "\n"
+ + EFogFalloff.LINEAR + ": Linear based on distance (will ignore 'density')\n"
+ + EFogFalloff.EXPONENTIAL + ": 1/(e^(distance*density)) \n"
+ + EFogFalloff.EXPONENTIAL_SQUARED + ": 1/(e^((distance*density)^2)")
+ .build();
+
+ public static ConfigEntry farFogDensity = new ConfigEntry.Builder()
+ .setMinDefaultMax(0.01,2.5, 50.0)
+ .comment(""
+ + "Used in conjunction with the Fog Falloff.")
+ .build();
+
+
+
+ public static ConfigCategory heightFog = new ConfigCategory.Builder().set(HeightFog.class).build();
+
+
+ public static class HeightFog
+ {
+ public static ConfigUIComment heightFogConfigScreenNote = new ConfigUIComment();
+
+ public static ConfigEntry heightFogMixMode = new ConfigEntry.Builder()
+ .set(EHeightFogMixMode.BASIC)
+ .comment(""
+ + "How should height effect the fog thickness? \n"
+ + "Note: height fog is combined with the other fog settings. \n"
+ + "\n"
+ + EHeightFogMixMode.BASIC + ": No special height fog effect. Fog is calculated based on camera distance \n"
+ + EHeightFogMixMode.IGNORE_HEIGHT + ": Ignore height completely. Fog is only calculated with horizontal distance \n"
+ + EHeightFogMixMode.ADDITION + ": heightFog + farFog \n"
+ + EHeightFogMixMode.MAX + ": max(heightFog, farFog) \n"
+ + EHeightFogMixMode.MULTIPLY + ": heightFog * farFog \n"
+ + EHeightFogMixMode.INVERSE_MULTIPLY + ": 1 - (1-heightFog) * (1-farFog) \n"
+ + EHeightFogMixMode.LIMITED_ADDITION + ": farFog + max(farFog, heightFog) \n"
+ + EHeightFogMixMode.MULTIPLY_ADDITION + ": farFog + farFog * heightFog \n"
+ + EHeightFogMixMode.INVERSE_MULTIPLY_ADDITION + ": farFog + 1 - (1-heightFog) * (1-farFog) \n"
+ + EHeightFogMixMode.AVERAGE + ": farFog*0.5 + heightFog*0.5 \n"
+ + "\n"
+ + "Note: height fog settings are ignored if '"+EHeightFogMixMode.BASIC+"' or '"+EHeightFogMixMode.IGNORE_HEIGHT+"' are selected.")
+ .build();
+
+ public static ConfigEntry heightFogMode = new ConfigEntry.Builder()
+ .set(EHeightFogMode.ABOVE_AND_BELOW_CAMERA)
+ .comment(""
+ + "Where should the height fog start? \n"
+ + "\n"
+ + EHeightFogMode.ABOVE_CAMERA + ": Height fog starts at the camera and goes towards the sky \n"
+ + EHeightFogMode.BELOW_CAMERA + ": Height fog starts at the camera and goes towards the void \n"
+ + EHeightFogMode.ABOVE_AND_BELOW_CAMERA + ": Height fog starts from the camera to goes towards both the sky and void \n"
+ + EHeightFogMode.ABOVE_SET_HEIGHT + ": Height fog starts from a set height and goes towards the sky \n"
+ + EHeightFogMode.BELOW_SET_HEIGHT + ": Height fog starts from a set height and goes towards the void \n"
+ + EHeightFogMode.ABOVE_AND_BELOW_SET_HEIGHT + ": Height fog starts from a set height and goes towards both the sky and void")
+ .build();
+
+ public static ConfigEntry heightFogHeight = new ConfigEntry.Builder()
+ .setMinDefaultMax(-4096.0, 70.0, 4096.0)
+ .comment("If the height fog is calculated around a set height, what is that height position?")
+ .build();
+
+ public static ConfigEntry heightFogStart = new ConfigEntry.Builder()
+ .setMinDefaultMax(FOG_RANGE_MIN, 0.0, FOG_RANGE_MAX)
+ .comment(""
+ + "Should the start of the height fog be offset? \n"
+ + "\n"
+ + "0.0: Fog start with no offset.\n"
+ + "1.0: Fog start with offset of the entire world's height. (Includes depth)")
+ .build();
+
+ public static ConfigEntry heightFogEnd = new ConfigEntry.Builder()
+ .setMinDefaultMax(FOG_RANGE_MIN, 1.0, FOG_RANGE_MAX)
+ .comment(""
+ + "Should the end of the height fog be offset? \n"
+ + "\n"
+ + "0.0: Fog end with no offset.\n"
+ + "1.0: Fog end with offset of the entire world's height. (Include depth)")
+ .build();
+
+ public static ConfigEntry heightFogMin = new ConfigEntry.Builder()
+ .setMinDefaultMax(-5.0, 0.0, FOG_RANGE_MAX)
+ .comment(""
+ + "What is the minimum fog thickness? \n"
+ + "\n"
+ + "0.0: No fog. \n"
+ + "1.0: Fully opaque fog.")
+ .build();
+
+ public static ConfigEntry heightFogMax = new ConfigEntry.Builder()
+ .setMinDefaultMax(FOG_RANGE_MIN, 1.0, 5.0)
+ .comment(""
+ + "What is the maximum fog thickness? \n"
+ + "\n"
+ + "0.0: No fog. \n"
+ + "1.0: Fully opaque fog.")
+ .build();
+
+ public static ConfigEntry heightFogFalloff = new ConfigEntry.Builder()
+ .set(EFogFalloff.EXPONENTIAL_SQUARED)
+ .comment(""
+ + "How should the height fog thickness should be calculated? \n"
+ + "\n"
+ + EFogFalloff.LINEAR + ": Linear based on height (will ignore 'density')\n"
+ + EFogFalloff.EXPONENTIAL + ": 1/(e^(height*density)) \n"
+ + EFogFalloff.EXPONENTIAL_SQUARED + ": 1/(e^((height*density)^2)")
+ .build();
+
+ public static ConfigEntry heightFogDensity = new ConfigEntry.Builder()
+ .setMinDefaultMax(0.01, 2.5, 50.0)
+ .comment("What is the height fog's density?")
+ .build();
+
+ }
+ }
+ }
+
+ public static class NoiseTextureSettings
+ {
+ public static ConfigEntry noiseEnable = new ConfigEntry.Builder()
+ .set(true)
+ .comment(""
+ + "Should a noise texture be applied to LODs? \n"
+ +"\n"
+ + "This is done to simulate textures and make the LODs appear more detailed. \n"
+ + "")
+ .build();
+
+ public static ConfigEntry noiseSteps = new ConfigEntry.Builder()
+ .setMinDefaultMax(0, 4, null)
+ .comment(""
+ + "How many steps of noise should be applied to LODs?")
+ .build();
+
+ public static ConfigEntry noiseIntensity = new ConfigEntry.Builder() // TODO: Make this a float (the ClassicConfigGUI doesn't support floats)
+ .setMinDefaultMax(0d, 10d, 100d) // TODO: Once this becomes a float make it 0-1 instead of 0-100 (I did this cus doubles only allow 2 decimal places)
+ .comment(""
+ + "How intense should the noise should be?")
+ .build();
+
+ public static ConfigEntry noiseDropoff = new ConfigEntry.Builder() // TODO: Make this a float (the ClassicConfigGUI doesn't support floats)
+ .setMinDefaultMax(0d, 3d, null)
+ .comment(""
+ + "How far should the noise texture render before it fades away? \n"
+ + "\n"
+ + "0.0 - the noise texture will render the entire LOD render distance. \n"
+ + "3.0 - the noise texture will fade away at 1/3 of the LOD render distance. \n"
+ + "")
+ .build();
+ }
+
+ public static class AdvancedGraphics
+ {
+ // TODO re-implement
+// public static ConfigEntry disableDirectionalCulling = new ConfigEntry.Builder()
+// .set(false)
+// .comment(""
+// + "If false fake chunks behind the player's camera \n"
+// + "aren't drawn, increasing GPU performance. \n"
+// + "\n"
+// + "If true all LODs are drawn, even those behind \n"
+// + "the player's camera, decreasing GPU performance. \n"
+// + "\n"
+// + "Disable this if you see LODs disappearing at the corners of your vision.")
+// .build();
+
+ // TODO replace with better options
+ public static ConfigEntry useExtendedNearClipPlane = new ConfigEntry.Builder()
+ .set(true)
+ .comment(""
+ + "Will prevent some overdraw issues, but may cause nearby fake chunks to render incorrectly \n"
+ + " especially when in/near an ocean.")
+ .setPerformance(ConfigEntryPerformance.NONE)
+ .build();
+
+ public static ConfigEntry brightnessMultiplier = new ConfigEntry.Builder() // TODO: Make this a float (the ClassicConfigGUI doesnt support floats)
+ .set(1.0)
+ .comment(""
+ + "How bright LOD colors are. \n"
+ + "\n"
+ + "0 = black \n"
+ + "1 = normal \n"
+ + "2 = near white")
+ .build();
+
+ public static ConfigEntry saturationMultiplier = new ConfigEntry.Builder() // TODO: Make this a float (the ClassicConfigGUI doesnt support floats)
+ .set(1.0)
+ .comment(""
+ + "How saturated LOD colors are. \n"
+ + "\n"
+ + "0 = black and white \n"
+ + "1 = normal \n"
+ + "2 = very saturated")
+ .build();
+
+ // TODO replace with better options
+ public static ConfigEntry enableCaveCulling = new ConfigEntry.Builder()
+ .set(true)
+ .comment(""
+ + "If enabled caves will be culled \n"
+ + "\n"
+ + "NOTE: This feature is under development and \n"
+ + " it is VERY experimental! Please don't report \n"
+ + " any issues related to this feature. \n"
+ + "\n"
+ + "Additional Info: Currently this cull all faces \n"
+ + " with skylight value of 0 in dimensions that \n"
+ + " does not have a ceiling.")
+ .build();
+
+ public static ConfigEntry caveCullingHeight = new ConfigEntry.Builder()
+ .setMinDefaultMax(-4096,40,4096)
+ .comment(""
+ + "At what Y value should cave culling start?")
+ .build();
+
+ public static ConfigEntry earthCurveRatio = new ConfigEntry.Builder()
+ .setMinDefaultMax(0,0,5000)
+ .comment(""
+ + "This is the earth size ratio when applying the curvature shader effect. \n"
+ + "Note: Enabling this feature may cause rendering bugs. \n"
+ + "\n"
+ + "0 = flat/disabled \n"
+ + "1 = 1 to 1 (6,371,000 blocks) \n"
+ + "100 = 1 to 100 (63,710 blocks) \n"
+ + "10000 = 1 to 10000 (637.1 blocks) \n"
+ + "\n"
+ + "Note: Due to current limitations, the min value is 50 \n"
+ + "and the max value is 5000. Any values outside this range \n"
+ + "will be set to 0 (disabled).")
+ .build();
+
+ public static ConfigEntry lodBias = new ConfigEntry.Builder()
+ .setMinDefaultMax(0d, 0d, null)
+ .comment(""
+ + "What the value should vanilla Minecraft's texture LodBias be? \n"
+ + "If set to 0 the mod wont overwrite vanilla's default (which so happens to also be 0)")
+ .build();
+
+ }
+
+ }
+
+ public static class WorldGenerator
+ {
+ public static ConfigEntry enableDistantGeneration = new ConfigEntry.Builder()
+ .set(true)
+ .comment(""
+ + " Should Distant Horizons slowly generate LODs \n"
+ + " outside the vanilla render distance?\n"
+ + "\n"
+ + " Note: when on a server, distant generation isn't supported \n"
+ + " and will always be disabled.")
+ .build();
+
+ public static ConfigEntry distantGeneratorMode = new ConfigEntry.Builder()
+ .set(EDhApiDistantGeneratorMode.FEATURES)
+ .comment(""
+ + "How detailed should LODs be generated outside the vanilla render distance? \n"
+ + "\n"
+ + EDhApiDistantGeneratorMode.PRE_EXISTING_ONLY + " \n"
+ + "Only create LOD data for already generated chunks. \n"
+ + "\n"
+ + EDhApiDistantGeneratorMode.BIOME_ONLY + " \n"
+ + "Only generate the biomes and use the biome's \n"
+ + "grass color, water color, or snow color. \n"
+ + "Doesn't generate height, everything is shown at sea level. \n"
+ + "- Fastest \n"
+ + "\n"
+ + EDhApiDistantGeneratorMode.BIOME_ONLY_SIMULATE_HEIGHT + " \n"
+ + "Same as " + EDhApiDistantGeneratorMode.BIOME_ONLY + ", except instead \n"
+ + "of always using sea level as the LOD height \n"
+ + "different biome types (mountain, ocean, forest, etc.) \n"
+ + "use predetermined heights to simulate having height data. \n"
+ + "- Fastest \n"
+ + "\n"
+ + EDhApiDistantGeneratorMode.SURFACE + " \n"
+ + "Generate the world surface, \n"
+ + "this does NOT include trees, \n"
+ + "or structures. \n"
+ + "- Faster \n"
+ + "\n"
+ + EDhApiDistantGeneratorMode.FEATURES + " \n"
+ + "Generate everything except structures. \n"
+ + "WARNING: This may cause world generator bugs or instability when paired with certain world generator mods. \n"
+ + "- Fast \n"
+ + "")
+ /*
+ // FULL isn't currently implemented
+ + "\n"
+ + EDhApiDistantGeneratorMode.FULL + " \n"
+ + "Ask the local server to generate/load each chunk. \n"
+ + "This is the most compatible, but will cause server/simulation lag. \n"
+ + "- Slow (15-50 ms, with spikes up to 200 ms) \n"
+ */
+ .build();
+
+ public static ConfigEntry lightingEngine = new ConfigEntry.Builder()
+ .set(ELightGenerationMode.DISTANT_HORIZONS)
+ .comment(""
+ + " How should distant generation chunk lighting be generated? \n"
+ + "\n"
+ + ELightGenerationMode.DISTANT_HORIZONS + ": Uses Distant Horizons' lighting engine to estimate chunk lighting. \n"
+ + " Generally lower quality; but more stable for large numbers of world generator threads. \n"
+ + ELightGenerationMode.MINECRAFT + ": Use Minecraft's lighting engine to generate chunk lighting. \n"
+ + " Generally higher quality; but may crash MC's lighting engine if there is an issue. \n"
+ + "\n"
+ + "This will effect generation speed, but not the rendering performance.")
+ .build();
+
+ // deprecated and not implemented, can be made public if we ever re-implement it
+ @Deprecated
+ private static ConfigEntry generationPriority = new ConfigEntry.Builder()
+ .set(EGenerationPriority.NEAR_FIRST)
+ .comment(""
+ + "In what priority should fake chunks be generated outside the vanilla render distance? \n"
+ + "\n"
+ + EGenerationPriority.FAR_FIRST + " \n"
+ + "Fake chunks are generated from lowest to highest detail \n"
+ + " with a priority for far away regions. \n"
+ + "This fills in the world fastest, but you will have large low detail \n"
+ + " blocks for a while while the generation happens. \n"
+ + "\n"
+ + EGenerationPriority.NEAR_FIRST + " \n"
+ + "Fake chunks are generated around the player \n"
+ + " in a spiral, similar to vanilla minecraft. \n"
+ + "Best used when on a server since we can't generate \n"
+ + " fake chunks. \n"
+ + "\n"
+ + EGenerationPriority.BALANCED + " \n"
+ + "A mix between "+ EGenerationPriority.NEAR_FIRST+"and"+ EGenerationPriority.FAR_FIRST+". \n"
+ + "First prioritise completing nearby highest detail chunks, \n"
+ + " then focus on filling in the low detail areas away from the player. \n"
+ + "\n"
+ + EGenerationPriority.AUTO + " \n"
+ + "Uses " + EGenerationPriority.BALANCED + " when on a single player world \n"
+ + " and " + EGenerationPriority.NEAR_FIRST + " when connected to a server.")
+ .setPerformance(ConfigEntryPerformance.NONE)
+ .build();
+
+ // TODO fixme
+ public static ConfigEntry blocksToAvoid = new ConfigEntry.Builder