diff --git a/api/src/main/java/com/seibel/lod/api/enums/config/EHorizontalResolution.java b/api/src/main/java/com/seibel/lod/api/enums/config/EMaxHorizontalResolution.java similarity index 81% rename from api/src/main/java/com/seibel/lod/api/enums/config/EHorizontalResolution.java rename to api/src/main/java/com/seibel/lod/api/enums/config/EMaxHorizontalResolution.java index 61fc5df70..7e5696cbb 100644 --- a/api/src/main/java/com/seibel/lod/api/enums/config/EHorizontalResolution.java +++ b/api/src/main/java/com/seibel/lod/api/enums/config/EMaxHorizontalResolution.java @@ -33,9 +33,9 @@ import com.seibel.lod.coreapi.util.MathUtil; * * @author James Seibel * @author Leonardo Amato - * @version 2022-7-5 + * @version 2023-6-14 */ -public enum EHorizontalResolution +public enum EMaxHorizontalResolution { /** render 256 LODs for each chunk */ BLOCK(16, 0), @@ -83,12 +83,12 @@ public enum EHorizontalResolution * 2nd dimension: An array of all LodDetails that are less than or
* equal to that detailLevel */ - private static EHorizontalResolution[][] lowerDetailArrays; + private static EMaxHorizontalResolution[][] lowerDetailArrays; - EHorizontalResolution(int newLengthCount, int newDetailLevel) + EMaxHorizontalResolution(int newLengthCount, int newDetailLevel) { this.detailLevel = (byte) newDetailLevel; this.dataPointLengthCount = newLengthCount; @@ -128,20 +128,20 @@ public enum EHorizontalResolution * Returns an array of all LodDetails that have a detail level * that is less than or equal to the given LodDetail */ - public static EHorizontalResolution[] getSelfAndLowerDetails(EHorizontalResolution detail) + public static EMaxHorizontalResolution[] getSelfAndLowerDetails(EMaxHorizontalResolution detail) { if (lowerDetailArrays == null) { // run first time setup - lowerDetailArrays = new EHorizontalResolution[EHorizontalResolution.values().length][]; + lowerDetailArrays = new EMaxHorizontalResolution[EMaxHorizontalResolution.values().length][]; // go through each LodDetail - for (EHorizontalResolution currentDetail : EHorizontalResolution.values()) + for (EMaxHorizontalResolution currentDetail : EMaxHorizontalResolution.values()) { - ArrayList lowerDetails = new ArrayList<>(); + ArrayList lowerDetails = new ArrayList<>(); // find the details lower than currentDetail - for (EHorizontalResolution compareDetail : EHorizontalResolution.values()) + for (EMaxHorizontalResolution compareDetail : EMaxHorizontalResolution.values()) { if (currentDetail.detailLevel <= compareDetail.detailLevel) { @@ -153,7 +153,7 @@ public enum EHorizontalResolution Collections.sort(lowerDetails); Collections.reverse(lowerDetails); - lowerDetailArrays[currentDetail.detailLevel] = lowerDetails.toArray(new EHorizontalResolution[lowerDetails.size()]); + lowerDetailArrays[currentDetail.detailLevel] = lowerDetails.toArray(new EMaxHorizontalResolution[lowerDetails.size()]); } } @@ -161,9 +161,9 @@ public enum EHorizontalResolution } /** Returns what detail level should be used at a given distance and maxDistance. */ - public static EHorizontalResolution getDetailForDistance(EHorizontalResolution maxDetailLevel, int distance, int maxDistance) + public static EMaxHorizontalResolution getDetailForDistance(EMaxHorizontalResolution maxDetailLevel, int distance, int maxDistance) { - EHorizontalResolution[] lowerDetails = getSelfAndLowerDetails(maxDetailLevel); + EMaxHorizontalResolution[] lowerDetails = getSelfAndLowerDetails(maxDetailLevel); int distanceBetweenDetails = maxDistance / lowerDetails.length; int index = MathUtil.clamp(0, distance / distanceBetweenDetails, lowerDetails.length - 1); 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/EDebugRendering.java similarity index 93% rename from api/src/main/java/com/seibel/lod/api/enums/rendering/EDebugMode.java rename to api/src/main/java/com/seibel/lod/api/enums/rendering/EDebugRendering.java index cfae31adb..31bb51557 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/EDebugRendering.java @@ -30,7 +30,7 @@ package com.seibel.lod.api.enums.rendering; * @author James Seibel * @version 2023-6-7 */ -public enum EDebugMode +public enum EDebugRendering { // Reminder: // when adding items up the API minor version @@ -53,7 +53,7 @@ public enum EDebugMode SHOW_RENDER_SOURCE_FLAG; - public static EDebugMode next(EDebugMode type) + public static EDebugRendering next(EDebugRendering type) { switch (type) { @@ -65,7 +65,7 @@ public enum EDebugMode } } - public static EDebugMode previous(EDebugMode type) + public static EDebugRendering previous(EDebugRendering type) { switch (type) { diff --git a/api/src/main/java/com/seibel/lod/api/interfaces/config/IDhApiConfig.java b/api/src/main/java/com/seibel/lod/api/interfaces/config/IDhApiConfig.java index b4859341b..27539682f 100644 --- a/api/src/main/java/com/seibel/lod/api/interfaces/config/IDhApiConfig.java +++ b/api/src/main/java/com/seibel/lod/api/interfaces/config/IDhApiConfig.java @@ -1,25 +1,24 @@ package com.seibel.lod.api.interfaces.config; import com.seibel.lod.api.interfaces.config.both.IDhApiWorldGenerationConfig; -import com.seibel.lod.api.interfaces.config.client.IDhApiBuffersConfig; -import com.seibel.lod.api.interfaces.config.client.IDhApiGraphicsConfig; -import com.seibel.lod.api.interfaces.config.client.IDhApiMultiplayerConfig; -import com.seibel.lod.api.interfaces.config.client.IDhApiThreadingConfig; +import com.seibel.lod.api.interfaces.config.client.*; /** - * This interfaces holds all of the config groups - * the API has access to for easy access to all config values. + * This interfaces holds all config groups + * the API has access to for easy access. * * @author James Seibel - * @version 9-15-2022 + * @version 2023-6-14 */ public interface IDhApiConfig { - - IDhApiWorldGenerationConfig getWorldGeneratorConfig(); - IDhApiBuffersConfig getBufferConfig(); - IDhApiGraphicsConfig getGraphicsConfig(); - IDhApiMultiplayerConfig getMultiplayerConfig(); - IDhApiThreadingConfig getThreadingConfig(); + IDhApiGraphicsConfig graphics(); + IDhApiWorldGenerationConfig worldGenerator(); + IDhApiMultiplayerConfig multiplayer(); + IDhApiMultiThreadingConfig multiThreading(); + IDhApiGpuBuffersConfig gpuBuffers(); + // note: DON'T add the Auto Updater to this API. We only want the user's to have the ability to control when things are downloaded to their machines. + //IDhApiLoggingConfig logging(); // TODO implement + IDhApiDebuggingConfig debugging(); } 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 e9f8b51c6..1b68033c5 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 @@ -19,11 +19,9 @@ package com.seibel.lod.api.interfaces.config.both; -import com.seibel.lod.api.enums.config.EBlocksToAvoid; -import com.seibel.lod.api.enums.worldGeneration.EDhApiDistantGeneratorMode; -import com.seibel.lod.api.enums.config.EGenerationPriority; -import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; import com.seibel.lod.api.enums.config.ELightGenerationMode; +import com.seibel.lod.api.enums.worldGeneration.EDhApiDistantGeneratorMode; +import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup; /** @@ -41,31 +39,14 @@ public interface IDhApiWorldGenerationConfig extends IDhApiConfigGroup * Defines whether fake chunks will be generated * outside Minecraft's vanilla render distance. */ - IDhApiConfigValue getEnableDistantWorldGeneration(); + IDhApiConfigValue enableDistantWorldGeneration(); /** Defines to what level fake chunks will be generated. */ - IDhApiConfigValue getDistantGeneratorMode(); + IDhApiConfigValue distantGeneratorMode(); - /** - * Defines what blocks will be ignored when generating LODs.

- * - * TODO if this isn't deprecated before 1.7 it should probably be moved to the graphics tab - * @deprecated this method won't be needed once we transition to an ID based save system
- * (vs the color based system we have currently) + /** + * TODO */ - @Deprecated - IDhApiConfigValue getBlocksToAvoid(); - - /** - * Defines if the color of avoided blocks will color the block below them.
- * (IE: if flowers are avoided should they color the grass below them?) - * - * TODO if this isn't deprecated before 1.7 it should probably be moved to the graphics tab - * @deprecated this method won't be needed once we transition to an ID based save system
- * (vs the color based system we have currently) - */ - @Deprecated - IDhApiConfigValue getTintWithAvoidedBlocks(); - + IDhApiConfigValue lightingEngine(); } diff --git a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiDebuggingConfig.java b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiDebuggingConfig.java index 79f14a445..e1b103dec 100644 --- a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiDebuggingConfig.java +++ b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiDebuggingConfig.java @@ -19,7 +19,7 @@ package com.seibel.lod.api.interfaces.config.client; -import com.seibel.lod.api.enums.rendering.EDebugMode; +import com.seibel.lod.api.enums.rendering.EDebugRendering; import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup; @@ -32,10 +32,19 @@ import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup; public interface IDhApiDebuggingConfig extends IDhApiConfigGroup { /** Can be used to debug the standard fake chunk rendering. */ - IDhApiConfigValue getDebugRenderMode(); + IDhApiConfigValue debugRendering(); /** If enabled debug keybindings can be used. */ - IDhApiConfigValue getEnableDebugKeybindings(); + IDhApiConfigValue debugKeybindings(); + + /** TODO */ + IDhApiConfigValue renderWireframe(); + + /** TODO */ + IDhApiConfigValue lodOnlyMode(); + + /** TODO */ + IDhApiConfigValue debugWireframeRendering(); } diff --git a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiFarFogConfig.java b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiFarFogConfig.java new file mode 100644 index 000000000..704c8cc37 --- /dev/null +++ b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiFarFogConfig.java @@ -0,0 +1,70 @@ +/* + * 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.interfaces.config.client; + +import com.seibel.lod.api.enums.rendering.*; +import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup; +import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; + +/** + * Distant Horizons' fog configuration.

+ * + * Note: unless an option explicitly states that it modifies + * Minecraft's vanilla rendering (like DisableVanillaFog) + * these settings will only affect Distant horizons' fog. + * + * @author James Seibel + * @version 2022-6-14 + */ +public interface IDhApiFarFogConfig extends IDhApiConfigGroup +{ + /** + * Defines where the fog starts as a percent of the + * fake chunks render distance radius.
+ * Can be greater than the fog end distance to invert the fog direction.

+ * + * 0.0 = fog starts at the camera
+ * 1.0 = fog starts at the edge of the fake chunk render distance
+ */ + IDhApiConfigValue farFogStartDistance(); + + /** + * Defines where the fog ends as a percent of the radius + * of the fake chunks render distance.
+ * Can be less than the fog start distance to invert the fog direction.

+ * + * 0.0 = fog ends at the camera
+ * 1.0 = fog ends at the edge of the fake chunk render distance
+ */ + IDhApiConfigValue farFogEndDistance(); + + /** Defines how opaque the fog is at its thinnest point. */ + IDhApiConfigValue farFogMinThickness(); + + /** Defines how opaque the fog is at its thickest point. */ + IDhApiConfigValue farFogMaxThickness(); + + /** Defines how the fog changes in thickness. */ + IDhApiConfigValue farFogFalloff(); + + /** Defines the fog density. */ + IDhApiConfigValue farFogDensity(); + +} diff --git a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiFogConfig.java b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiFogConfig.java new file mode 100644 index 000000000..841e253d2 --- /dev/null +++ b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiFogConfig.java @@ -0,0 +1,58 @@ +/* + * 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.interfaces.config.client; + +import com.seibel.lod.api.enums.rendering.*; +import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup; +import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; + +/** + * Distant Horizons' fog configuration.

+ * + * Note: unless an option explicitly states that it modifies + * Minecraft's vanilla rendering (like DisableVanillaFog) + * these settings will only affect Distant horizons' fog. + * + * @author James Seibel + * @version 2022-6-14 + */ +public interface IDhApiFogConfig extends IDhApiConfigGroup +{ + + //====================// + // basic fog settings // + //====================// + + /** Defines at what distance fog is rendered on fake chunks. */ + IDhApiConfigValue distance(); + + /** Should be used to enable/disable fog rendering. */ + IDhApiConfigValue drawMode(); + + /** Can be used to enable support with mods that change vanilla MC's fog color. */ + IDhApiConfigValue color(); + + /** + * If enabled attempts to disable vanilla MC's fog on real chunks.
+ * May not play nice with other fog editing mods. + */ + IDhApiConfigValue disableVanillaFog(); + +} diff --git a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiBuffersConfig.java b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiGpuBuffersConfig.java similarity index 86% rename from api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiBuffersConfig.java rename to api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiGpuBuffersConfig.java index bfd17d67d..7a2043653 100644 --- a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiBuffersConfig.java +++ b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiGpuBuffersConfig.java @@ -27,13 +27,13 @@ import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; * Distant Horizons' OpenGL buffer configuration. * * @author James Seibel - * @version 2022-9-15 + * @version 2023-6-14 */ -public interface IDhApiBuffersConfig extends IDhApiConfigGroup +public interface IDhApiGpuBuffersConfig extends IDhApiConfigGroup { /** Defines how geometry data is uploaded to the GPU. */ - IDhApiConfigValue getGpuUploadMethod(); + IDhApiConfigValue gpuUploadMethod(); /** * Defines how long we should wait after uploading one @@ -42,6 +42,6 @@ public interface IDhApiBuffersConfig extends IDhApiConfigGroup * This can be set to a non-zero number to reduce stuttering caused by * uploading buffers to the GPU. */ - IDhApiConfigValue getBufferUploadTimeoutPerMegabyteInMilliseconds(); + IDhApiConfigValue gpuUploadPerMegabyteInMilliseconds(); } 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 db6b2a485..3d83d325a 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 @@ -21,6 +21,7 @@ package com.seibel.lod.api.interfaces.config.client; import com.seibel.lod.api.enums.config.*; import com.seibel.lod.api.enums.rendering.ERendererMode; +import com.seibel.lod.api.enums.rendering.ETransparency; import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup; @@ -28,25 +29,33 @@ import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup; * Distant Horizons' graphics/rendering configuration. * * @author James Seibel - * @version 2022-9-15 + * @version 2023-6-14 */ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup { + //===============// + // inner configs // + //===============// + + IDhApiFogConfig fog(); + IDhApiNoiseTextureConfig noiseTexture(); + + //========================// // basic graphic settings // //========================// /** The distance is the radius measured in chunks. */ - IDhApiConfigValue getChunkRenderDistance(); + IDhApiConfigValue chunkRenderDistance(); /** - * Simplified version of {@link IDhApiGraphicsConfig#getRenderingMode()} + * Simplified version of {@link IDhApiGraphicsConfig#renderingMode()} * that only enables/disables the fake chunk rendering.

* - * Changing this config also changes {@link IDhApiGraphicsConfig#getRenderingMode()}'s value. + * Changing this config also changes {@link IDhApiGraphicsConfig#renderingMode()}'s value. */ - IDhApiConfigValue getRenderingEnabled(); + IDhApiConfigValue renderingEnabled(); /** * Can be used to enable/disable fake chunk rendering or enable the debug renderer.

@@ -54,9 +63,9 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup * The debug renderer is used to confirm rendering is working at and will draw * a single multicolor rhombus on the screen in skybox space (AKA behind MC's rendering).

* - * Changing this config also changes {@link IDhApiGraphicsConfig#getRenderingEnabled()}'s value. + * Changing this config also changes {@link IDhApiGraphicsConfig#renderingEnabled()}'s value. */ - IDhApiConfigValue getRenderingMode(); + IDhApiConfigValue renderingMode(); @@ -65,14 +74,27 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup //==================// /** Defines how detailed fake chunks are in the horizontal direction */ - IDhApiConfigValue getMaxDetailLevel(); + IDhApiConfigValue maxHorizontalResolution(); /** Defines how detailed fake chunks are in the vertical direction */ - IDhApiConfigValue getVerticalQuality(); + IDhApiConfigValue verticalQuality(); /** Modifies the quadratic function fake chunks use for horizontal quality drop-off. */ - IDhApiConfigValue getHorizontalQualityDropoff(); - + IDhApiConfigValue horizontalQuality(); + + IDhApiConfigValue ambientOcclusion(); + + IDhApiConfigValue transparency(); + + /** Defines what blocks won't be rendered as LODs. */ + IDhApiConfigValue blocksToAvoid(); + + /** + * Defines if the color of avoided blocks will color the block below them.
+ * (IE: if flowers are avoided, should they color the grass below them?) + */ + IDhApiConfigValue tintWithAvoidedBlocks(); + /** * The same as vanilla Minecraft's biome blending.

* @@ -95,32 +117,35 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup * Disabling this reduces holes in the world due to the near clip plane * being too close to the camera and the terrain not being covered by vanilla terrain. */ - IDhApiConfigValue getUseExtendedNearClipPlane(); + IDhApiConfigValue overdrawPrevention(); /** * Modifies how bright fake chunks are.
* This is done when generating the vertex data and is applied before any shaders. */ - IDhApiConfigValue getBrightnessMultiplier(); + IDhApiConfigValue brightnessMultiplier(); /** * Modifies how saturated fake chunks are.
* This is done when generating the vertex data and is applied before any shaders. */ - IDhApiConfigValue getSaturationMultiplier(); + IDhApiConfigValue saturationMultiplier(); /** Defines if Distant Horizons should attempt to cull fake chunk cave geometry. */ - IDhApiConfigValue getCaveCullingEnabled(); + IDhApiConfigValue caveCullingEnabled(); /** Defines what height cave culling should be used below if enabled. */ - IDhApiConfigValue getCaveCullingHeight(); + IDhApiConfigValue caveCullingHeight(); /** This ratio is relative to Earth's real world curvature. */ - IDhApiConfigValue getEarthCurvatureRatio(); + IDhApiConfigValue earthCurvatureRatio(); /** If enabled vanilla chunk rendering is disabled and only fake chunks are rendered. */ - IDhApiConfigValue getEnableLodOnlyMode(); - + IDhApiConfigValue lodOnlyMode(); + /** + * TODO + */ + IDhApiConfigValue lodBias(); } 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 deleted file mode 100644 index a060a316e..000000000 --- a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiGraphicsFogConfig.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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.interfaces.config.client; - -import com.seibel.lod.api.enums.rendering.*; -import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup; -import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; - -/** - * Distant Horizons' fog configuration.

- * - * Note: unless an option explicitly states that it modifies - * Minecraft's vanilla rendering (like DisableVanillaFog) - * these settings will only affect Distant horizons' fog. - * - * @author James Seibel - * @version 2022-9-15 - */ -public interface IDhApiGraphicsFogConfig extends IDhApiConfigGroup -{ - - //====================// - // basic fog settings // - //====================// - - /** Defines at what distance fog is rendered on fake chunks. */ - IDhApiConfigValue getFogDistance(); - - /** Should be used to enable/disable fog rendering. */ - IDhApiConfigValue getFogRender(); - - /** Can be used to enable support with mods that change vanilla MC's fog color. */ - IDhApiConfigValue getFogColor(); - - /** - * If enabled attempts to disable vanilla MC's fog on real chunks.
- * May not play nice with other fog editing mods. - */ - IDhApiConfigValue getDisableVanillaFog(); - - - //=======================// - // advanced fog settings // - //=======================// - - /** - * Defines where the fog starts as a percent of the - * fake chunks render distance radius.
- * Can be greater than the fog end distance to invert the fog direction.

- * - * 0.0 = fog starts at the camera
- * 1.0 = fog starts at the edge of the fake chunk render distance
- */ - IDhApiConfigValue getFogStartDistance(); - - /** - * Defines where the fog ends as a percent of the radius - * of the fake chunks render distance.
- * Can be less than the fog start distance to invert the fog direction.

- * - * 0.0 = fog ends at the camera
- * 1.0 = fog ends at the edge of the fake chunk render distance
- */ - IDhApiConfigValue getFogEndDistance(); - - /** Defines how opaque the fog is at its thinnest point. */ - IDhApiConfigValue getFogMinThickness(); - - /** Defines how opaque the fog is at its thickest point. */ - IDhApiConfigValue getFogMaxThickness(); - - /** Defines how the fog changes in thickness. */ - IDhApiConfigValue getFarFogFalloff(); - - /** Defines the fog density. */ - IDhApiConfigValue getFogDensity(); - - - //=====================// - // height fog settings // - //=====================// - - /** Defines how the height fog mixes. */ - IDhApiConfigValue getHeightFogMixMode(); - - /** Defines how the height fog is drawn relative to the camera or world. */ - IDhApiConfigValue getHeightFogMode(); - - /** - * Defines the height fog's base height if {@link IDhApiGraphicsFogConfig#getHeightFogMode()} - * is set to use a specific height. - */ - IDhApiConfigValue getHeightFogBaseHeight(); - - /** Defines the height fog's starting height as a percent of the world height. */ - IDhApiConfigValue getHeightFogStartingHeightPercent(); - - /** Defines the height fog's ending height as a percent of the world height. */ - IDhApiConfigValue getHeightFogEndingHeightPercent(); - - /** Defines how opaque the height fog is at its thinnest point. */ - IDhApiConfigValue getHeightFogMinThickness(); - - /** Defines how opaque the height fog is at its thickest point. */ - IDhApiConfigValue getHeightFogMaxThickness(); - - /** Defines how the height fog changes in thickness. */ - IDhApiConfigValue getHeightFogFalloff(); - - /** Defines the height fog's density. */ - IDhApiConfigValue getHeightFogDensity(); - -} diff --git a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiHeightFogConfig.java b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiHeightFogConfig.java new file mode 100644 index 000000000..ab05a7406 --- /dev/null +++ b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiHeightFogConfig.java @@ -0,0 +1,71 @@ +/* + * 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.interfaces.config.client; + +import com.seibel.lod.api.enums.rendering.EFogFalloff; +import com.seibel.lod.api.enums.rendering.EHeightFogMixMode; +import com.seibel.lod.api.enums.rendering.EHeightFogMode; +import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup; +import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; + +/** + * Distant Horizons' fog configuration.

+ * + * Note: unless an option explicitly states that it modifies + * Minecraft's vanilla rendering (like DisableVanillaFog) + * these settings will only affect Distant horizons' fog. + * + * @author James Seibel + * @version 2022-6-14 + */ +public interface IDhApiHeightFogConfig extends IDhApiConfigGroup +{ + + /** Defines how the height fog mixes. */ + IDhApiConfigValue heightFogMixMode(); + + /** Defines how the height fog is drawn relative to the camera or world. */ + IDhApiConfigValue heightFogMode(); + + /** + * Defines the height fog's base height if {@link IDhApiHeightFogConfig#heightFogMode()} + * is set to use a specific height. + */ + IDhApiConfigValue heightFogBaseHeight(); + + /** Defines the height fog's starting height as a percent of the world height. */ + IDhApiConfigValue heightFogStartingHeightPercent(); + + /** Defines the height fog's ending height as a percent of the world height. */ + IDhApiConfigValue heightFogEndingHeightPercent(); + + /** Defines how opaque the height fog is at its thinnest point. */ + IDhApiConfigValue heightFogMinThickness(); + + /** Defines how opaque the height fog is at its thickest point. */ + IDhApiConfigValue heightFogMaxThickness(); + + /** Defines how the height fog changes in thickness. */ + IDhApiConfigValue heightFogFalloff(); + + /** Defines the height fog's density. */ + IDhApiConfigValue heightFogDensity(); + +} diff --git a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiLoggingConfig.java b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiLoggingConfig.java new file mode 100644 index 000000000..d71214156 --- /dev/null +++ b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiLoggingConfig.java @@ -0,0 +1,37 @@ +/* + * 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.interfaces.config.client; + +import com.seibel.lod.api.enums.rendering.EFogColorMode; +import com.seibel.lod.api.enums.rendering.EFogDistance; +import com.seibel.lod.api.enums.rendering.EFogDrawMode; +import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup; +import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; + +/** + * Distant Horizons' fog configuration.

+ * + * @author James Seibel + * @version 2022-6-14 + */ +public interface IDhApiLoggingConfig extends IDhApiConfigGroup +{ + // TODO implement +} diff --git a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiThreadingConfig.java b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiMultiThreadingConfig.java similarity index 78% rename from api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiThreadingConfig.java rename to api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiMultiThreadingConfig.java index 19fa66204..617ee456c 100644 --- a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiThreadingConfig.java +++ b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiMultiThreadingConfig.java @@ -26,9 +26,9 @@ import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup; * Distant Horizons' threading configuration. * * @author James Seibel - * @version 2023-6-5 + * @version 2023-6-14 */ -public interface IDhApiThreadingConfig extends IDhApiConfigGroup +public interface IDhApiMultiThreadingConfig extends IDhApiConfigGroup { /** @@ -36,19 +36,15 @@ public interface IDhApiThreadingConfig extends IDhApiConfigGroup * terrain outside Minecraft's vanilla render distance.
*
* If the number of threads is less than 1 it will be treated as a percentage - * representing how often the single thread will actively generate terrain.

- * - * @deprecated this (and the related config) should be replaced with an int - * count of threads and then a double percent active config. + * representing how often the single thread will actively generate terrain. */ - @Deprecated - IDhApiConfigValue getWorldGeneratorThread(); + IDhApiConfigValue worldGeneratorThreads(); /** Defines how many buffer (GPU Terrain data) builder threads are used. */ - IDhApiConfigValue getBufferBuilderThread(); + IDhApiConfigValue bufferBuilderThreads(); /** Defines how many file handler threads are used. */ - IDhApiConfigValue getFileHandlerThread(); + IDhApiConfigValue fileHandlerThreads(); /** * Defines how many Full to Render data converter threads are used.

@@ -56,6 +52,11 @@ public interface IDhApiThreadingConfig extends IDhApiConfigGroup * Full data - Distant Horizons data based on BlockState and Biome IDs
* Render data - color data used when Distant Horizons is rendering */ - IDhApiConfigValue getDataConverterThread(); + IDhApiConfigValue dataConverterThreads(); + + /** + * TODO + */ + IDhApiConfigValue chunkLodConverterThreads(); } diff --git a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiMultiplayerConfig.java b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiMultiplayerConfig.java index 994337fcf..d7392bb70 100644 --- a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiMultiplayerConfig.java +++ b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiMultiplayerConfig.java @@ -27,7 +27,7 @@ import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup; * Distant Horizons' client-side multiplayer configuration. * * @author James Seibel - * @version 2022-9-15 + * @version 2023-6-14 */ public interface IDhApiMultiplayerConfig extends IDhApiConfigGroup { @@ -36,7 +36,7 @@ public interface IDhApiMultiplayerConfig extends IDhApiConfigGroup * Defines how multiplayer server folders are named.
* Note: Changing this while connected to a multiplayer world will cause undefined behavior! */ - IDhApiConfigValue getFolderSavingMode(); + IDhApiConfigValue folderSavingMode(); /** * Defines the necessary similarity (as a percent) that two potential levels @@ -47,7 +47,7 @@ public interface IDhApiMultiplayerConfig extends IDhApiConfigGroup * Setting this to a non-zero value allows for usage in servers that user Multiverse * or similar mods. */ - IDhApiConfigValue getMultiverseSimilarityRequirement(); + IDhApiConfigValue multiverseSimilarityRequirement(); } diff --git a/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiNoiseTextureConfig.java b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiNoiseTextureConfig.java new file mode 100644 index 000000000..53ad891cb --- /dev/null +++ b/api/src/main/java/com/seibel/lod/api/interfaces/config/client/IDhApiNoiseTextureConfig.java @@ -0,0 +1,53 @@ +/* + * 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.interfaces.config.client; + +import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup; +import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; + +/** + * Distant Horizons' noise texture configuration.

+ * + * @author James Seibel + * @version 2022-6-14 + */ +public interface IDhApiNoiseTextureConfig extends IDhApiConfigGroup +{ + /** + * TODO + */ + IDhApiConfigValue noiseEnabled(); + + /** + * TODO + */ + IDhApiConfigValue noiseSteps(); + + /** + * TODO + */ + IDhApiConfigValue noiseIntensity(); + + /** + * TODO + */ + IDhApiConfigValue noiseDropoff(); + +} diff --git a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/DhApiConfig.java b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/DhApiConfig.java index ed81a5a84..578f898d7 100644 --- a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/DhApiConfig.java +++ b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/DhApiConfig.java @@ -2,22 +2,10 @@ package com.seibel.lod.core.api.external.methods.config; import com.seibel.lod.api.interfaces.config.IDhApiConfig; import com.seibel.lod.api.interfaces.config.both.IDhApiWorldGenerationConfig; -import com.seibel.lod.api.interfaces.config.client.IDhApiBuffersConfig; -import com.seibel.lod.api.interfaces.config.client.IDhApiGraphicsConfig; -import com.seibel.lod.api.interfaces.config.client.IDhApiMultiplayerConfig; -import com.seibel.lod.api.interfaces.config.client.IDhApiThreadingConfig; -import com.seibel.lod.core.api.external.methods.config.both.DhApiWorldGenerationConfig; -import com.seibel.lod.core.api.external.methods.config.client.DhApiBuffersConfig; -import com.seibel.lod.core.api.external.methods.config.client.DhApiGraphicsConfig; -import com.seibel.lod.core.api.external.methods.config.client.DhApiMultiplayerConfig; -import com.seibel.lod.core.api.external.methods.config.client.DhApiThreadingConfig; +import com.seibel.lod.api.interfaces.config.client.*; +import com.seibel.lod.core.api.external.methods.config.client.*; +import com.seibel.lod.core.api.external.methods.config.common.DhApiWorldGenerationConfig; -/** - * A singleton that holds all of the config groups for the API. - * - * @author James Seibel - * @version 9-15-2022 - */ public class DhApiConfig implements IDhApiConfig { public static final DhApiConfig INSTANCE = new DhApiConfig(); @@ -25,15 +13,18 @@ public class DhApiConfig implements IDhApiConfig private DhApiConfig() { } + + @Override + public IDhApiGraphicsConfig graphics() { return DhApiGraphicsConfig.INSTANCE; } @Override - public IDhApiWorldGenerationConfig getWorldGeneratorConfig() { return DhApiWorldGenerationConfig.INSTANCE; } + public IDhApiWorldGenerationConfig worldGenerator() { return DhApiWorldGenerationConfig.INSTANCE; } + @Override + public IDhApiMultiplayerConfig multiplayer() { return DhApiMultiplayerConfig.INSTANCE; } + @Override + public IDhApiMultiThreadingConfig multiThreading() { return DhApiMultiThreadingConfig.INSTANCE; } @Override - public IDhApiBuffersConfig getBufferConfig() { return DhApiBuffersConfig.INSTANCE; } + public IDhApiGpuBuffersConfig gpuBuffers() { return DhApiGpuBuffersConfig.INSTANCE; } @Override - public IDhApiGraphicsConfig getGraphicsConfig() { return DhApiGraphicsConfig.INSTANCE; } - @Override - public IDhApiMultiplayerConfig getMultiplayerConfig() { return DhApiMultiplayerConfig.INSTANCE; } - @Override - public IDhApiThreadingConfig getThreadingConfig() { return DhApiThreadingConfig.INSTANCE; } + public IDhApiDebuggingConfig debugging() { return DhApiDebuggingConfig.INSTANCE; } } diff --git a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiDebuggingConfig.java b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiDebuggingConfig.java index c6aba94c4..af121db3e 100644 --- a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiDebuggingConfig.java +++ b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiDebuggingConfig.java @@ -23,14 +23,8 @@ import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; import com.seibel.lod.api.interfaces.config.client.IDhApiDebuggingConfig; import com.seibel.lod.api.objects.config.DhApiConfigValue; import com.seibel.lod.core.config.Config.Client.Advanced.Debugging; -import com.seibel.lod.api.enums.rendering.EDebugMode; +import com.seibel.lod.api.enums.rendering.EDebugRendering; -/** - * Distant Horizons' debug configuration. - * - * @author James Seibel - * @version 2022-9-15 - */ public class DhApiDebuggingConfig implements IDhApiDebuggingConfig { public static DhApiDebuggingConfig INSTANCE = new DhApiDebuggingConfig(); @@ -39,10 +33,19 @@ public class DhApiDebuggingConfig implements IDhApiDebuggingConfig - public IDhApiConfigValue getDebugRenderMode() - { return new DhApiConfigValue<>(Debugging.debugMode); } + public IDhApiConfigValue debugRendering() + { return new DhApiConfigValue(Debugging.debugRendering); } - public IDhApiConfigValue getEnableDebugKeybindings() - { return new DhApiConfigValue<>(Debugging.enableDebugKeybindings); } + public IDhApiConfigValue debugKeybindings() + { return new DhApiConfigValue(Debugging.enableDebugKeybindings); } + + public IDhApiConfigValue renderWireframe() + { return new DhApiConfigValue(Debugging.renderWireframe); } + + public IDhApiConfigValue lodOnlyMode() + { return new DhApiConfigValue(Debugging.lodOnlyMode); } + + public IDhApiConfigValue debugWireframeRendering() + { return new DhApiConfigValue(Debugging.debugWireframeRendering); } } diff --git a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiFarFogConfig.java b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiFarFogConfig.java new file mode 100644 index 000000000..ad521180b --- /dev/null +++ b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiFarFogConfig.java @@ -0,0 +1,61 @@ +/* + * 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.core.api.external.methods.config.client; + +import com.seibel.lod.api.enums.rendering.*; +import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; +import com.seibel.lod.api.interfaces.config.client.IDhApiFarFogConfig; +import com.seibel.lod.api.interfaces.config.client.IDhApiFogConfig; +import com.seibel.lod.api.objects.config.DhApiConfigValue; +import com.seibel.lod.core.config.Config.Client.Advanced.Graphics.Fog; + +public class DhApiFarFogConfig implements IDhApiFarFogConfig +{ + public static DhApiFarFogConfig INSTANCE = new DhApiFarFogConfig(); + + private DhApiFarFogConfig() { } + + + + @Override + public IDhApiConfigValue farFogStartDistance() + { return new DhApiConfigValue(Fog.AdvancedFog.farFogStart); } + + @Override + public IDhApiConfigValue farFogEndDistance() + { return new DhApiConfigValue(Fog.AdvancedFog.farFogEnd); } + + @Override + public IDhApiConfigValue farFogMinThickness() + { return new DhApiConfigValue(Fog.AdvancedFog.farFogMin); } + + @Override + public IDhApiConfigValue farFogMaxThickness() + { return new DhApiConfigValue(Fog.AdvancedFog.farFogMax); } + + @Override + public IDhApiConfigValue farFogFalloff() + { return new DhApiConfigValue(Fog.AdvancedFog.farFogFalloff); } + + @Override + public IDhApiConfigValue farFogDensity() + { return new DhApiConfigValue(Fog.AdvancedFog.farFogDensity); } + +} diff --git a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiFogConfig.java b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiFogConfig.java new file mode 100644 index 000000000..ae371c336 --- /dev/null +++ b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiFogConfig.java @@ -0,0 +1,67 @@ +/* + * 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.core.api.external.methods.config.client; + +import com.seibel.lod.api.enums.rendering.*; +import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; +import com.seibel.lod.api.interfaces.config.client.IDhApiFarFogConfig; +import com.seibel.lod.api.interfaces.config.client.IDhApiFogConfig; +import com.seibel.lod.api.interfaces.config.client.IDhApiHeightFogConfig; +import com.seibel.lod.api.objects.config.DhApiConfigValue; +import com.seibel.lod.core.config.Config.Client.Advanced.Graphics.Fog; + +public class DhApiFogConfig implements IDhApiFogConfig +{ + public static DhApiFogConfig INSTANCE = new DhApiFogConfig(); + + private DhApiFogConfig() { } + + + + //===============// + // inner configs // + //===============// + + public IDhApiFarFogConfig farFog() { return DhApiFarFogConfig.INSTANCE; } + public IDhApiHeightFogConfig heightFog() { return DhApiHeightFogConfig.INSTANCE; } + + + + //====================// + // basic fog settings // + //====================// + + @Override + public IDhApiConfigValue distance() + { return new DhApiConfigValue<>(Fog.distance); } + + @Override + public IDhApiConfigValue drawMode() + { return new DhApiConfigValue<>(Fog.drawMode); } + + @Override + public IDhApiConfigValue color() + { return new DhApiConfigValue<>(Fog.colorMode); } + + @Override + public IDhApiConfigValue disableVanillaFog() + { return new DhApiConfigValue<>(Fog.disableVanillaFog); } + +} 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/DhApiGpuBuffersConfig.java similarity index 73% rename from core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiBuffersConfig.java rename to core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiGpuBuffersConfig.java index b1b33a9b3..659778da2 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/DhApiGpuBuffersConfig.java @@ -20,30 +20,24 @@ 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.interfaces.config.client.IDhApiGpuBuffersConfig; import com.seibel.lod.api.objects.config.DhApiConfigValue; 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; -/** - * Distant Horizons' OpenGL buffer configuration. - * - * @author James Seibel - * @version 2022-9-15 - */ -public class DhApiBuffersConfig implements IDhApiBuffersConfig +public class DhApiGpuBuffersConfig implements IDhApiGpuBuffersConfig { - public static DhApiBuffersConfig INSTANCE = new DhApiBuffersConfig(); + public static DhApiGpuBuffersConfig INSTANCE = new DhApiGpuBuffersConfig(); - private DhApiBuffersConfig() { } + private DhApiGpuBuffersConfig() { } - public IDhApiConfigValue getGpuUploadMethod() + public IDhApiConfigValue gpuUploadMethod() { return new DhApiConfigValue<>(Config.Client.Advanced.GpuBuffers.gpuUploadMethod); } - public IDhApiConfigValue getBufferUploadTimeoutPerMegabyteInMilliseconds() + public IDhApiConfigValue 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 95afd0601..9de814045 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 @@ -20,21 +20,18 @@ package com.seibel.lod.core.api.external.methods.config.client; import com.seibel.lod.api.enums.config.*; +import com.seibel.lod.api.enums.rendering.ETransparency; import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; +import com.seibel.lod.api.interfaces.config.client.IDhApiFogConfig; import com.seibel.lod.api.interfaces.config.client.IDhApiGraphicsConfig; +import com.seibel.lod.api.interfaces.config.client.IDhApiNoiseTextureConfig; import com.seibel.lod.api.objects.config.DhApiConfigValue; -import com.seibel.lod.coreapi.util.converters.RenderModeEnabledConverter; import com.seibel.lod.api.enums.rendering.ERendererMode; +import com.seibel.lod.core.config.Config; 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.Advanced.Graphics.AdvancedGraphics; -/** - * Distant Horizons' graphics/rendering configuration. - * - * @author James Seibel - * @version 2022-9-15 - */ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig { public static DhApiGraphicsConfig INSTANCE = new DhApiGraphicsConfig(); @@ -43,21 +40,30 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig + //==============// + // inner layers // + //==============// + + public IDhApiFogConfig fog() { return DhApiFogConfig.INSTANCE; } + public IDhApiNoiseTextureConfig noiseTexture() { return DhApiNoiseTextureConfig.INSTANCE; } + + + //========================// // basic graphic settings // //========================// @Override - public IDhApiConfigValue getChunkRenderDistance() - { return new DhApiConfigValue<>(Quality.lodChunkRenderDistance); } + public IDhApiConfigValue chunkRenderDistance() + { return new DhApiConfigValue(Quality.lodChunkRenderDistance); } @Override - public IDhApiConfigValue getRenderingEnabled() - { return new DhApiConfigValue(Debugging.rendererMode, new RenderModeEnabledConverter()); } + public IDhApiConfigValue renderingEnabled() + { return new DhApiConfigValue(Config.Client.quickEnableRendering); } @Override - public IDhApiConfigValue getRenderingMode() - { return new DhApiConfigValue<>(Debugging.rendererMode); } + public IDhApiConfigValue renderingMode() + { return new DhApiConfigValue(Debugging.rendererMode); } @@ -66,20 +72,37 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig //==================// @Override - public IDhApiConfigValue getMaxDetailLevel() - { return new DhApiConfigValue<>(Quality.drawResolution); } + public IDhApiConfigValue maxHorizontalResolution() + { return new DhApiConfigValue(Quality.maxHorizontalResolution); } @Override - public IDhApiConfigValue getVerticalQuality() - { return new DhApiConfigValue<>(Quality.verticalQuality); } + public IDhApiConfigValue verticalQuality() + { return new DhApiConfigValue(Quality.verticalQuality); } @Override - public IDhApiConfigValue getHorizontalQualityDropoff() - { return new DhApiConfigValue<>(Quality.horizontalQuality); } + public IDhApiConfigValue horizontalQuality() + { return new DhApiConfigValue(Quality.horizontalQuality); } + @Override + public IDhApiConfigValue ambientOcclusion() + { return new DhApiConfigValue(Quality.ssao); } + + @Override + public IDhApiConfigValue transparency() + { return new DhApiConfigValue(Quality.transparency); } + + @Override + public IDhApiConfigValue blocksToAvoid() + { return new DhApiConfigValue(Quality.blocksToIgnore); } + + @Override + public IDhApiConfigValue tintWithAvoidedBlocks() + { return new DhApiConfigValue(Quality.tintWithAvoidedBlocks); } + + // TODO re-implement // @Override // public IDhApiConfigValue getBiomeBlending() -// { return new DhApiConfigValue<>(Quality.lodBiomeBlending); } +// { return new DhApiConfigValue(Quality.lodBiomeBlending); } @@ -89,35 +112,39 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig // @Override // public IDhApiConfigValue getDisableDirectionalCulling() -// { return new DhApiConfigValue<>(AdvancedGraphics.disableDirectionalCulling); } +// { return new DhApiConfigValue(AdvancedGraphics.disableDirectionalCulling); } @Override - public IDhApiConfigValue getUseExtendedNearClipPlane() - { return new DhApiConfigValue<>(AdvancedGraphics.overdrawPrevention); } + public IDhApiConfigValue overdrawPrevention() + { return new DhApiConfigValue(AdvancedGraphics.overdrawPrevention); } @Override - public IDhApiConfigValue getBrightnessMultiplier() - { return new DhApiConfigValue<>(AdvancedGraphics.brightnessMultiplier); } + public IDhApiConfigValue brightnessMultiplier() + { return new DhApiConfigValue(AdvancedGraphics.brightnessMultiplier); } @Override - public IDhApiConfigValue getSaturationMultiplier() - { return new DhApiConfigValue<>(AdvancedGraphics.saturationMultiplier); } + public IDhApiConfigValue saturationMultiplier() + { return new DhApiConfigValue(AdvancedGraphics.saturationMultiplier); } @Override - public IDhApiConfigValue getCaveCullingEnabled() - { return new DhApiConfigValue<>(AdvancedGraphics.enableCaveCulling); } + public IDhApiConfigValue caveCullingEnabled() + { return new DhApiConfigValue(AdvancedGraphics.enableCaveCulling); } @Override - public IDhApiConfigValue getCaveCullingHeight() - { return new DhApiConfigValue<>(AdvancedGraphics.caveCullingHeight); } + public IDhApiConfigValue caveCullingHeight() + { return new DhApiConfigValue(AdvancedGraphics.caveCullingHeight); } @Override - public IDhApiConfigValue getEarthCurvatureRatio() - { return new DhApiConfigValue<>(AdvancedGraphics.earthCurveRatio); } + public IDhApiConfigValue earthCurvatureRatio() + { return new DhApiConfigValue(AdvancedGraphics.earthCurveRatio); } @Override - public IDhApiConfigValue getEnableLodOnlyMode() - { return new DhApiConfigValue<>(Debugging.lodOnlyMode); } + public IDhApiConfigValue lodOnlyMode() + { return new DhApiConfigValue(Debugging.lodOnlyMode); } + + @Override + public IDhApiConfigValue lodBias() + { return new DhApiConfigValue(AdvancedGraphics.lodBias); } 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 deleted file mode 100644 index 1f2210d45..000000000 --- a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiGraphicsFogConfig.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * 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.core.api.external.methods.config.client; - -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.Advanced.Graphics.Fog; - -/** - * Distant Horizons' fog configuration.

- * - * Note: unless an option explicitly states that it modifies - * Minecraft's vanilla rendering (like DisableVanillaFog) - * these settings will only affect Distant horizons' fog. - * - * @author James Seibel - * @version 2022-9-15 - */ -public class DhApiGraphicsFogConfig implements IDhApiGraphicsFogConfig -{ - public static DhApiGraphicsFogConfig INSTANCE = new DhApiGraphicsFogConfig(); - - private DhApiGraphicsFogConfig() { } - - - - //====================// - // basic fog settings // - //====================// - - @Override - public IDhApiConfigValue getFogDistance() - { return new DhApiConfigValue<>(Fog.fogDistance); } - - @Override - public IDhApiConfigValue getFogRender() - { return new DhApiConfigValue<>(Fog.fogDrawMode); } - - @Override - public IDhApiConfigValue getFogColor() - { return new DhApiConfigValue<>(Fog.fogColorMode); } - - @Override - public IDhApiConfigValue getDisableVanillaFog() - { return new DhApiConfigValue<>(Fog.disableVanillaFog); } - - - //=======================// - // advanced fog settings // - //=======================// - - @Override - public IDhApiConfigValue getFogStartDistance() - { return new DhApiConfigValue<>(Fog.AdvancedFog.farFogStart); } - - @Override - public IDhApiConfigValue getFogEndDistance() - { return new DhApiConfigValue<>(Fog.AdvancedFog.farFogEnd); } - - @Override - public IDhApiConfigValue getFogMinThickness() - { return new DhApiConfigValue<>(Fog.AdvancedFog.farFogMin); } - - @Override - public IDhApiConfigValue getFogMaxThickness() - { return new DhApiConfigValue<>(Fog.AdvancedFog.farFogMax); } - - @Override - public IDhApiConfigValue getFarFogFalloff() - { return new DhApiConfigValue<>(Fog.AdvancedFog.farFogFalloff); } - - @Override - public IDhApiConfigValue getFogDensity() - { return new DhApiConfigValue<>(Fog.AdvancedFog.farFogDensity); } - - - //=====================// - // height fog settings // - //=====================// - - @Override - public IDhApiConfigValue getHeightFogMixMode() - { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogMixMode); } - - @Override - public IDhApiConfigValue getHeightFogMode() - { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogMode); } - - @Override - public IDhApiConfigValue getHeightFogBaseHeight() - { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogHeight); } - - @Override - public IDhApiConfigValue getHeightFogStartingHeightPercent() - { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogStart); } - - @Override - public IDhApiConfigValue getHeightFogEndingHeightPercent() - { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogEnd); } - - @Override - public IDhApiConfigValue getHeightFogMinThickness() - { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogMin); } - - @Override - public IDhApiConfigValue getHeightFogMaxThickness() - { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogMax); } - - @Override - public IDhApiConfigValue getHeightFogFalloff() - { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogFalloff); } - - @Override - public IDhApiConfigValue getHeightFogDensity() - { return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogDensity); } - -} diff --git a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiHeightFogConfig.java b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiHeightFogConfig.java new file mode 100644 index 000000000..c45ddf906 --- /dev/null +++ b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiHeightFogConfig.java @@ -0,0 +1,72 @@ +/* + * 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.core.api.external.methods.config.client; + +import com.seibel.lod.api.enums.rendering.*; +import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; +import com.seibel.lod.api.interfaces.config.client.IDhApiHeightFogConfig; +import com.seibel.lod.api.objects.config.DhApiConfigValue; +import com.seibel.lod.core.config.Config.Client.Advanced.Graphics.Fog; + +public class DhApiHeightFogConfig implements IDhApiHeightFogConfig +{ + public static DhApiHeightFogConfig INSTANCE = new DhApiHeightFogConfig(); + + private DhApiHeightFogConfig() { } + + + + @Override + public IDhApiConfigValue heightFogMixMode() + { return new DhApiConfigValue(Fog.AdvancedFog.HeightFog.heightFogMixMode); } + + @Override + public IDhApiConfigValue heightFogMode() + { return new DhApiConfigValue(Fog.AdvancedFog.HeightFog.heightFogMode); } + + @Override + public IDhApiConfigValue heightFogBaseHeight() + { return new DhApiConfigValue(Fog.AdvancedFog.HeightFog.heightFogBaseHeight); } + + @Override + public IDhApiConfigValue heightFogStartingHeightPercent() + { return new DhApiConfigValue(Fog.AdvancedFog.HeightFog.heightFogStart); } + + @Override + public IDhApiConfigValue heightFogEndingHeightPercent() + { return new DhApiConfigValue(Fog.AdvancedFog.HeightFog.heightFogEnd); } + + @Override + public IDhApiConfigValue heightFogMinThickness() + { return new DhApiConfigValue(Fog.AdvancedFog.HeightFog.heightFogMin); } + + @Override + public IDhApiConfigValue heightFogMaxThickness() + { return new DhApiConfigValue(Fog.AdvancedFog.HeightFog.heightFogMax); } + + @Override + public IDhApiConfigValue heightFogFalloff() + { return new DhApiConfigValue(Fog.AdvancedFog.HeightFog.heightFogFalloff); } + + @Override + public IDhApiConfigValue heightFogDensity() + { return new DhApiConfigValue(Fog.AdvancedFog.HeightFog.heightFogDensity); } + +} diff --git a/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiMultiThreadingConfig.java b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiMultiThreadingConfig.java new file mode 100644 index 000000000..d7f36e496 --- /dev/null +++ b/core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiMultiThreadingConfig.java @@ -0,0 +1,55 @@ +/* + * 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.core.api.external.methods.config.client; + +import com.seibel.lod.api.interfaces.config.IDhApiConfigValue; +import com.seibel.lod.api.interfaces.config.client.IDhApiMultiThreadingConfig; +import com.seibel.lod.api.objects.config.DhApiConfigValue; +import com.seibel.lod.core.config.Config.Client.Advanced.MultiThreading; + +public class DhApiMultiThreadingConfig implements IDhApiMultiThreadingConfig +{ + public static DhApiMultiThreadingConfig INSTANCE = new DhApiMultiThreadingConfig(); + + private DhApiMultiThreadingConfig() { } + + + + @Override + public IDhApiConfigValue worldGeneratorThreads() + { return new DhApiConfigValue(MultiThreading.numberOfWorldGenerationThreads); } + + @Override + public IDhApiConfigValue bufferBuilderThreads() + { return new DhApiConfigValue(MultiThreading.numberOfBufferBuilderThreads); } + + @Override + public IDhApiConfigValue fileHandlerThreads() + { return new DhApiConfigValue(MultiThreading.numberOfFileHandlerThreads); } + + @Override + public IDhApiConfigValue dataConverterThreads() + { return new DhApiConfigValue(MultiThreading.numberOfDataConverterThreads); } + + @Override + public IDhApiConfigValue chunkLodConverterThreads() + { return new DhApiConfigValue(MultiThreading.numberOfChunkLodConverterThreads); } + +} 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 6cf1feac7..c589e4a8c 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 @@ -25,12 +25,6 @@ import com.seibel.lod.api.objects.config.DhApiConfigValue; import com.seibel.lod.core.config.Config.Client.Advanced.Multiplayer; import com.seibel.lod.api.enums.config.EServerFolderNameMode; -/** - * Distant Horizons' client-side multiplayer configuration. - * - * @author James Seibel - * @version 2022-9-15 - */ public class DhApiMultiplayerConfig implements IDhApiMultiplayerConfig { public static DhApiMultiplayerConfig INSTANCE = new DhApiMultiplayerConfig(); @@ -39,10 +33,10 @@ public class DhApiMultiplayerConfig implements IDhApiMultiplayerConfig - public IDhApiConfigValue getFolderSavingMode() - { return new DhApiConfigValue<>(Multiplayer.serverFolderNameMode); } + public IDhApiConfigValue folderSavingMode() + { return new DhApiConfigValue(Multiplayer.serverFolderNameMode); } - public IDhApiConfigValue getMultiverseSimilarityRequirement() - { return new DhApiConfigValue<>(Multiplayer.multiDimensionRequiredSimilarity); } + public IDhApiConfigValue multiverseSimilarityRequirement() + { return new DhApiConfigValue(Multiplayer.multiverseSimilarityRequiredPercent); } } 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/DhApiNoiseTextureConfig.java similarity index 51% rename from core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiThreadingConfig.java rename to core/src/main/java/com/seibel/lod/core/api/external/methods/config/client/DhApiNoiseTextureConfig.java index 746f02083..093532d24 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/DhApiNoiseTextureConfig.java @@ -20,38 +20,32 @@ 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.interfaces.config.client.IDhApiNoiseTextureConfig; import com.seibel.lod.api.objects.config.DhApiConfigValue; -import com.seibel.lod.core.config.Config.Client.Advanced.MultiThreading; +import com.seibel.lod.core.config.Config.Client.Advanced.Graphics.NoiseTextureSettings; -/** - * Distant Horizons' threading configuration. - * - * @author James Seibel - * @version 2022-9-15 - */ -public class DhApiThreadingConfig implements IDhApiThreadingConfig +public class DhApiNoiseTextureConfig implements IDhApiNoiseTextureConfig { - public static DhApiThreadingConfig INSTANCE = new DhApiThreadingConfig(); + public static DhApiNoiseTextureConfig INSTANCE = new DhApiNoiseTextureConfig(); - private DhApiThreadingConfig() { } + private DhApiNoiseTextureConfig() { } @Override - public IDhApiConfigValue getWorldGeneratorThread() - { return new DhApiConfigValue<>(MultiThreading.numberOfWorldGenerationThreads); } + public IDhApiConfigValue noiseEnabled() + { return new DhApiConfigValue(NoiseTextureSettings.noiseEnabled); } @Override - public IDhApiConfigValue getBufferBuilderThread() - { return new DhApiConfigValue<>(MultiThreading.numberOfBufferBuilderThreads); } + public IDhApiConfigValue noiseSteps() + { return new DhApiConfigValue(NoiseTextureSettings.noiseSteps); } @Override - public IDhApiConfigValue getFileHandlerThread() - { return new DhApiConfigValue<>(MultiThreading.numberOfFileHandlerThreads); } + public IDhApiConfigValue noiseIntensity() + { return new DhApiConfigValue(NoiseTextureSettings.noiseIntensity); } @Override - public IDhApiConfigValue getDataConverterThread() - { return new DhApiConfigValue<>(MultiThreading.numberOfDataConverterThreads); } + public IDhApiConfigValue noiseDropoff() + { return new DhApiConfigValue(NoiseTextureSettings.noiseDropoff); } } 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/common/DhApiWorldGenerationConfig.java similarity index 72% rename from core/src/main/java/com/seibel/lod/core/api/external/methods/config/both/DhApiWorldGenerationConfig.java rename to core/src/main/java/com/seibel/lod/core/api/external/methods/config/common/DhApiWorldGenerationConfig.java index 7b0a112b8..70422af8f 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/common/DhApiWorldGenerationConfig.java @@ -17,8 +17,9 @@ * along with this program. If not, see . */ -package com.seibel.lod.core.api.external.methods.config.both; +package com.seibel.lod.core.api.external.methods.config.common; +import com.seibel.lod.api.enums.config.ELightGenerationMode; 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; @@ -30,10 +31,10 @@ import com.seibel.lod.api.enums.worldGeneration.EDhApiDistantGeneratorMode; /** * Distant Horizons' world generation configuration.

* - * Note: Fake chunks are NOT saved in Minecraft's vanilla save system. + * Note: LODs are NOT saved in Minecraft's save system. * * @author James Seibel - * @version 2022-9-15 + * @version 2023-9-14 */ public class DhApiWorldGenerationConfig implements IDhApiWorldGenerationConfig { @@ -44,22 +45,16 @@ public class DhApiWorldGenerationConfig implements IDhApiWorldGenerationConfig @Override - public IDhApiConfigValue getEnableDistantWorldGeneration() + public IDhApiConfigValue enableDistantWorldGeneration() { return new DhApiConfigValue<>(WorldGenerator.enableDistantGeneration); } @Override - public IDhApiConfigValue getDistantGeneratorMode() + public IDhApiConfigValue distantGeneratorMode() { return new DhApiConfigValue<>(WorldGenerator.distantGeneratorMode); } - @Deprecated @Override - public IDhApiConfigValue getBlocksToAvoid() - { return new DhApiConfigValue<>(Config.Client.Advanced.Graphics.Quality.blocksToIgnore); } - - @Deprecated - @Override - public IDhApiConfigValue getTintWithAvoidedBlocks() - { return new DhApiConfigValue<>(Config.Client.Advanced.Graphics.Quality.tintWithAvoidedBlocks); } + public IDhApiConfigValue lightingEngine() + { return new DhApiConfigValue<>(WorldGenerator.lightingEngine); } } diff --git a/core/src/main/java/com/seibel/lod/core/api/internal/ClientApi.java b/core/src/main/java/com/seibel/lod/core/api/internal/ClientApi.java index ceba3f4f7..6cf7e9bc0 100644 --- a/core/src/main/java/com/seibel/lod/core/api/internal/ClientApi.java +++ b/core/src/main/java/com/seibel/lod/core/api/internal/ClientApi.java @@ -25,7 +25,7 @@ import com.seibel.lod.coreapi.DependencyInjection.ApiEventInjector; import com.seibel.lod.core.level.IDhClientLevel; import com.seibel.lod.core.config.Config; import com.seibel.lod.coreapi.ModInfo; -import com.seibel.lod.api.enums.rendering.EDebugMode; +import com.seibel.lod.api.enums.rendering.EDebugRendering; import com.seibel.lod.api.enums.rendering.ERendererMode; import com.seibel.lod.core.dependencyInjection.SingletonInjector; import com.seibel.lod.core.level.IDhLevel; @@ -338,8 +338,8 @@ public class ClientApi if (glfwKey == GLFW.GLFW_KEY_F8) { - Config.Client.Advanced.Debugging.debugMode.set(EDebugMode.next(Config.Client.Advanced.Debugging.debugMode.get())); - MC.sendChatMessage("F8: Set debug mode to " + Config.Client.Advanced.Debugging.debugMode.get()); + Config.Client.Advanced.Debugging.debugRendering.set(EDebugRendering.next(Config.Client.Advanced.Debugging.debugRendering.get())); + MC.sendChatMessage("F8: Set debug mode to " + Config.Client.Advanced.Debugging.debugRendering.get()); } else if (glfwKey == GLFW.GLFW_KEY_F6) { 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 581b5761c..b0ea45b41 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 @@ -49,28 +49,9 @@ import java.util.*; public class Config { - // TODO update this diagram - // CONFIG STRUCTURE - // -> Client - // | - // |-> Graphics - // | |-> Quality - // | |-> FogQuality - // | |-> AdvancedGraphics - // | |-> NoiseTextureSettings - // | - // |-> World Generation - // | - // |-> Advanced - // |-> Threads - // |-> GpuBuffers - // |-> Debugging - - // Since the original config system uses forge stuff, that means we have to rewrite the whole config system - public static ConfigCategory client = new ConfigCategory.Builder().set(Client.class).build(); - - + + public static class Client { public static ConfigEntry quickEnableRendering = new ConfigEntry.Builder() @@ -147,20 +128,20 @@ public class Config public static class Quality { - public static ConfigEntry drawResolution = new ConfigEntry.Builder() - .set(EHorizontalResolution.BLOCK) + public static ConfigEntry maxHorizontalResolution = new ConfigEntry.Builder() + .set(EMaxHorizontalResolution.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" + + EMaxHorizontalResolution.CHUNK + ": render 1 LOD for each Chunk. \n" + + EMaxHorizontalResolution.HALF_CHUNK + ": render 4 LODs for each Chunk. \n" + + EMaxHorizontalResolution.FOUR_BLOCKS + ": render 16 LODs for each Chunk. \n" + + EMaxHorizontalResolution.TWO_BLOCKS + ": render 64 LODs for each Chunk. \n" + + EMaxHorizontalResolution.BLOCK + ": render 256 LODs for each Chunk (width of one block). \n" + "\n" - + "Lowest Quality: " + EHorizontalResolution.CHUNK + "\n" - + "Highest Quality: " + EHorizontalResolution.BLOCK) + + "Lowest Quality: " + EMaxHorizontalResolution.CHUNK + "\n" + + "Highest Quality: " + EMaxHorizontalResolution.BLOCK) .addListener(RenderCacheConfigEventHandler.INSTANCE) .setPerformance(EConfigEntryPerformance.MEDIUM) .build(); @@ -185,15 +166,6 @@ public class Config .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 ssao = new ConfigEntry.Builder() .set(true) .comment("Enable Screen Space Ambient Occlusion") @@ -261,7 +233,7 @@ public class Config public static class Fog { - public static ConfigEntry fogDrawMode = new ConfigEntry.Builder() + public static ConfigEntry drawMode = new ConfigEntry.Builder() .set(EFogDrawMode.FOG_ENABLED) .comment("" + "When should fog be drawn? \n" @@ -275,13 +247,13 @@ public class Config .setPerformance(EConfigEntryPerformance.VERY_LOW) .build(); - public static ConfigEntry fogDistance = new ConfigEntry.Builder() + public static ConfigEntry distance = new ConfigEntry.Builder() .set(EFogDistance.FAR) .comment("At what distance should Fog be drawn on the LODs?") .setPerformance(EConfigEntryPerformance.NONE) .build(); - public static ConfigEntry fogColorMode = new ConfigEntry.Builder() + public static ConfigEntry colorMode = new ConfigEntry.Builder() .set(EFogColorMode.USE_WORLD_FOG_COLOR) .comment("" + "What color should fog use? \n" @@ -370,8 +342,6 @@ public class Config public static class HeightFog { - public static ConfigUIComment heightFogConfigScreenNote = new ConfigUIComment(); - public static ConfigEntry heightFogMixMode = new ConfigEntry.Builder() .set(EHeightFogMixMode.BASIC) .comment("" @@ -405,7 +375,7 @@ public class Config + 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() + public static ConfigEntry heightFogBaseHeight = 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(); @@ -467,7 +437,7 @@ public class Config public static class NoiseTextureSettings { - public static ConfigEntry noiseEnable = new ConfigEntry.Builder() + public static ConfigEntry noiseEnabled = new ConfigEntry.Builder() .set(true) .comment("" + "Should a noise texture be applied to LODs? \n" @@ -708,7 +678,7 @@ public class Config + 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() + public static ConfigEntry multiverseSimilarityRequiredPercent = new ConfigEntry.Builder() .setMinDefaultMax(0.0, 0.0, 1.0) .comment("" + "AKA: Multiverse support. \n" @@ -971,15 +941,15 @@ public class Config + ERendererMode.DISABLED + ": Disable rendering") .build(); - public static ConfigEntry debugMode = new ConfigEntry.Builder() - .set(EDebugMode.OFF) + public static ConfigEntry debugRendering = new ConfigEntry.Builder() + .set(EDebugRendering.OFF) .comment("" + "Should specialized colors/rendering modes be used? \n" + "\n" - + EDebugMode.OFF + ": Fake chunks will be drawn with their normal colors. \n" - + EDebugMode.SHOW_DETAIL + ": Fake chunks color will be based on their detail level. \n" - + EDebugMode.SHOW_GENMODE + ": Fake chunks color will be based on their distant generation mode. \n" - + EDebugMode.SHOW_OVERLAPPING_QUADS + ": Fake chunks will be drawn with total white, but overlapping quads will be drawn with red. \n" + + EDebugRendering.OFF + ": Fake chunks will be drawn with their normal colors. \n" + + EDebugRendering.SHOW_DETAIL + ": Fake chunks color will be based on their detail level. \n" + + EDebugRendering.SHOW_GENMODE + ": Fake chunks color will be based on their distant generation mode. \n" + + EDebugRendering.SHOW_OVERLAPPING_QUADS + ": Fake chunks will be drawn with total white, but overlapping quads will be drawn with red. \n" + " but overlapping quads will be drawn with red, drawn as a wireframe.") .build(); @@ -1089,6 +1059,7 @@ public class Config } + // TODO implement public static class ResetConfirmation { public static ConfigUIComment resetConfirmationNote = new ConfigUIComment(); diff --git a/core/src/main/java/com/seibel/lod/core/config/eventHandlers/RenderCacheConfigEventHandler.java b/core/src/main/java/com/seibel/lod/core/config/eventHandlers/RenderCacheConfigEventHandler.java index 33ada22fe..02400537b 100644 --- a/core/src/main/java/com/seibel/lod/core/config/eventHandlers/RenderCacheConfigEventHandler.java +++ b/core/src/main/java/com/seibel/lod/core/config/eventHandlers/RenderCacheConfigEventHandler.java @@ -1,7 +1,7 @@ package com.seibel.lod.core.config.eventHandlers; import com.seibel.lod.api.DhApiMain; -import com.seibel.lod.api.enums.config.EHorizontalResolution; +import com.seibel.lod.api.enums.config.EMaxHorizontalResolution; import com.seibel.lod.api.enums.config.EVerticalQuality; import com.seibel.lod.core.config.Config; import com.seibel.lod.core.config.listeners.IConfigListener; @@ -21,7 +21,7 @@ public class RenderCacheConfigEventHandler implements IConfigListener // previous values used to check if a watched setting was actually modified private EVerticalQuality previousVerticalQualitySetting = null; - private EHorizontalResolution previousHorizontalResolution = null; + private EMaxHorizontalResolution previousHorizontalResolution = null; /** how long to wait in milliseconds before applying the config changes */ private static final long TIMEOUT_IN_MS = 400L; @@ -47,7 +47,7 @@ public class RenderCacheConfigEventHandler implements IConfigListener refreshRenderData = true; } - EHorizontalResolution newHorizontalResolution = Config.Client.Advanced.Graphics.Quality.drawResolution.get(); + EMaxHorizontalResolution newHorizontalResolution = Config.Client.Advanced.Graphics.Quality.maxHorizontalResolution.get(); if (this.previousHorizontalResolution != newHorizontalResolution) { this.previousHorizontalResolution = newHorizontalResolution; diff --git a/core/src/main/java/com/seibel/lod/core/config/eventHandlers/presets/RenderQualityPresetConfigEventHandler.java b/core/src/main/java/com/seibel/lod/core/config/eventHandlers/presets/RenderQualityPresetConfigEventHandler.java index 56e8d9bec..dafc077da 100644 --- a/core/src/main/java/com/seibel/lod/core/config/eventHandlers/presets/RenderQualityPresetConfigEventHandler.java +++ b/core/src/main/java/com/seibel/lod/core/config/eventHandlers/presets/RenderQualityPresetConfigEventHandler.java @@ -1,7 +1,7 @@ package com.seibel.lod.core.config.eventHandlers.presets; import com.seibel.lod.api.enums.config.EHorizontalQuality; -import com.seibel.lod.api.enums.config.EHorizontalResolution; +import com.seibel.lod.api.enums.config.EMaxHorizontalResolution; import com.seibel.lod.api.enums.config.EVerticalQuality; import com.seibel.lod.api.enums.config.quickOptions.EQualityPreset; import com.seibel.lod.api.enums.rendering.ETransparency; @@ -21,14 +21,14 @@ public class RenderQualityPresetConfigEventHandler extends AbstractPresetConfigE private static final Logger LOGGER = LogManager.getLogger(); - private final ConfigEntryWithPresetOptions drawResolution = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.Graphics.Quality.drawResolution, - new HashMap() + private final ConfigEntryWithPresetOptions drawResolution = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.Graphics.Quality.maxHorizontalResolution, + new HashMap() {{ - this.put(EQualityPreset.MINIMUM, EHorizontalResolution.TWO_BLOCKS); - this.put(EQualityPreset.LOW, EHorizontalResolution.BLOCK); - this.put(EQualityPreset.MEDIUM, EHorizontalResolution.BLOCK); - this.put(EQualityPreset.HIGH, EHorizontalResolution.BLOCK); - this.put(EQualityPreset.EXTREME, EHorizontalResolution.BLOCK); + this.put(EQualityPreset.MINIMUM, EMaxHorizontalResolution.TWO_BLOCKS); + this.put(EQualityPreset.LOW, EMaxHorizontalResolution.BLOCK); + this.put(EQualityPreset.MEDIUM, EMaxHorizontalResolution.BLOCK); + this.put(EQualityPreset.HIGH, EMaxHorizontalResolution.BLOCK); + this.put(EQualityPreset.EXTREME, EMaxHorizontalResolution.BLOCK); }}); private final ConfigEntryWithPresetOptions verticalQuality = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.Graphics.Quality.verticalQuality, new HashMap() diff --git a/core/src/main/java/com/seibel/lod/core/dataObjects/render/bufferBuilding/ColumnRenderBufferBuilder.java b/core/src/main/java/com/seibel/lod/core/dataObjects/render/bufferBuilding/ColumnRenderBufferBuilder.java index bf411dfff..cd511585c 100644 --- a/core/src/main/java/com/seibel/lod/core/dataObjects/render/bufferBuilding/ColumnRenderBufferBuilder.java +++ b/core/src/main/java/com/seibel/lod/core/dataObjects/render/bufferBuilding/ColumnRenderBufferBuilder.java @@ -1,7 +1,7 @@ package com.seibel.lod.core.dataObjects.render.bufferBuilding; import com.seibel.lod.api.enums.config.EGpuUploadMethod; -import com.seibel.lod.api.enums.rendering.EDebugMode; +import com.seibel.lod.api.enums.rendering.EDebugRendering; import com.seibel.lod.api.enums.rendering.EGLProxyContext; import com.seibel.lod.core.config.Config; import com.seibel.lod.core.config.listeners.ConfigChangeListener; @@ -159,7 +159,7 @@ public class ColumnRenderBufferBuilder private static void makeLodRenderData(LodQuadBuilder quadBuilder, ColumnRenderSource renderSource, ColumnRenderSource[] adjRegions) { // Variable initialization - EDebugMode debugMode = Config.Client.Advanced.Debugging.debugMode.get(); + EDebugRendering debugMode = Config.Client.Advanced.Debugging.debugRendering.get(); // can be uncommented to limit which section positions are build and thus, rendered // useful when debugging a specific section diff --git a/core/src/main/java/com/seibel/lod/core/dataObjects/render/bufferBuilding/CubicLodTemplate.java b/core/src/main/java/com/seibel/lod/core/dataObjects/render/bufferBuilding/CubicLodTemplate.java index 00c97159d..c91d8e5d2 100644 --- a/core/src/main/java/com/seibel/lod/core/dataObjects/render/bufferBuilding/CubicLodTemplate.java +++ b/core/src/main/java/com/seibel/lod/core/dataObjects/render/bufferBuilding/CubicLodTemplate.java @@ -22,7 +22,7 @@ package com.seibel.lod.core.dataObjects.render.bufferBuilding; import com.seibel.lod.core.config.Config; import com.seibel.lod.core.dataObjects.render.ColumnRenderSource; import com.seibel.lod.core.util.RenderDataPointUtil; -import com.seibel.lod.api.enums.rendering.EDebugMode; +import com.seibel.lod.api.enums.rendering.EDebugRendering; import com.seibel.lod.core.dataObjects.render.columnViews.ColumnArrayView; import com.seibel.lod.core.pos.DhLodPos; import com.seibel.lod.coreapi.util.BitShiftUtil; @@ -40,7 +40,7 @@ public class CubicLodTemplate public static void addLodToBuffer( long data, long topData, long bottomData, ColumnArrayView[][] adjData, byte detailLevel, int offsetPosX, int offsetOosZ, LodQuadBuilder quadBuilder, - EDebugMode debugging, ColumnRenderSource.DebugSourceFlag debugSource) + EDebugRendering debugging, ColumnRenderSource.DebugSourceFlag debugSource) { DhLodPos blockOffsetPos = new DhLodPos(detailLevel, offsetPosX, offsetOosZ).convertToDetailLevel(LodUtil.BLOCK_DETAIL_LEVEL); diff --git a/core/src/main/java/com/seibel/lod/core/file/structure/ClientOnlySaveStructure.java b/core/src/main/java/com/seibel/lod/core/file/structure/ClientOnlySaveStructure.java index c46286cdb..ef322f973 100644 --- a/core/src/main/java/com/seibel/lod/core/file/structure/ClientOnlySaveStructure.java +++ b/core/src/main/java/com/seibel/lod/core/file/structure/ClientOnlySaveStructure.java @@ -58,7 +58,7 @@ public class ClientOnlySaveStructure extends AbstractSaveStructure { return this.levelToFileMap.computeIfAbsent(level, (newLevel) -> { - if (Config.Client.Advanced.Multiplayer.multiDimensionRequiredSimilarity.get() == 0) + if (Config.Client.Advanced.Multiplayer.multiverseSimilarityRequiredPercent.get() == 0) { if (this.fileMatcher != null) { diff --git a/core/src/main/java/com/seibel/lod/core/file/subDimMatching/SubDimCompare.java b/core/src/main/java/com/seibel/lod/core/file/subDimMatching/SubDimCompare.java index df5bc30bc..36d82bdb9 100644 --- a/core/src/main/java/com/seibel/lod/core/file/subDimMatching/SubDimCompare.java +++ b/core/src/main/java/com/seibel/lod/core/file/subDimMatching/SubDimCompare.java @@ -78,7 +78,7 @@ public class SubDimCompare implements Comparable /** Returns true if this sub dimension is close enough to be considered a valid sub dimension */ public boolean isValidSubDim() { - double minimumSimilarityRequired = Config.Client.Advanced.Multiplayer.multiDimensionRequiredSimilarity.get(); + double minimumSimilarityRequired = Config.Client.Advanced.Multiplayer.multiverseSimilarityRequiredPercent.get(); return this.getPercentEqual() >= minimumSimilarityRequired || this.playerPosDist <= MAX_SIMILAR_PLAYER_POS_DISTANCE_IN_BLOCKS; } diff --git a/core/src/main/java/com/seibel/lod/core/render/LodQuadTree.java b/core/src/main/java/com/seibel/lod/core/render/LodQuadTree.java index 061aa6b33..b01cf9378 100644 --- a/core/src/main/java/com/seibel/lod/core/render/LodQuadTree.java +++ b/core/src/main/java/com/seibel/lod/core/render/LodQuadTree.java @@ -337,7 +337,7 @@ public class LodQuadTree extends QuadTree implements AutoClose private void updateDetailLevelVariables() { - this.maxRenderDetailLevel = Config.Client.Advanced.Graphics.Quality.drawResolution.get().detailLevel; + this.maxRenderDetailLevel = Config.Client.Advanced.Graphics.Quality.maxHorizontalResolution.get().detailLevel; this.detailDropOffDistanceUnit = Config.Client.Advanced.Graphics.Quality.horizontalQuality.get().distanceUnitInBlocks * LodUtil.CHUNK_WIDTH; this.detailDropOffLogBase = Math.log(Config.Client.Advanced.Graphics.Quality.horizontalQuality.get().quadraticBase); } diff --git a/core/src/main/java/com/seibel/lod/core/render/fog/LodFogConfig.java b/core/src/main/java/com/seibel/lod/core/render/fog/LodFogConfig.java index 3befbb63b..f30ec2dc4 100644 --- a/core/src/main/java/com/seibel/lod/core/render/fog/LodFogConfig.java +++ b/core/src/main/java/com/seibel/lod/core/render/fog/LodFogConfig.java @@ -66,7 +66,7 @@ public class LodFogConfig public static LodFogConfig generateFogConfig() { - EFogDrawMode fogMode = Config.Client.Advanced.Graphics.Fog.fogDrawMode.get(); + EFogDrawMode fogMode = Config.Client.Advanced.Graphics.Fog.drawMode.get(); if (fogMode == EFogDrawMode.USE_OPTIFINE_SETTING && OPTIFINE != null) { fogMode = OPTIFINE.getFogDrawMode(); @@ -80,7 +80,7 @@ public class LodFogConfig // TODO: Move these out of here earthCurveRatio = Config.Client.Advanced.Graphics.AdvancedGraphics.earthCurveRatio.get(); - noiseEnable = Config.Client.Advanced.Graphics.NoiseTextureSettings.noiseEnable.get(); + noiseEnable = Config.Client.Advanced.Graphics.NoiseTextureSettings.noiseEnabled.get(); noiseSteps = Config.Client.Advanced.Graphics.NoiseTextureSettings.noiseSteps.get(); noiseIntensity = Config.Client.Advanced.Graphics.NoiseTextureSettings.noiseIntensity.get().floatValue(); noiseDropoff = Config.Client.Advanced.Graphics.NoiseTextureSettings.noiseDropoff.get().floatValue(); @@ -88,7 +88,7 @@ public class LodFogConfig if (fogDrawMode != EFogDrawMode.FOG_DISABLED) { - EFogDistance fogDistance = Config.Client.Advanced.Graphics.Fog.fogDistance.get(); + EFogDistance fogDistance = Config.Client.Advanced.Graphics.Fog.distance.get(); drawNearFog = (fogDistance == EFogDistance.NEAR || fogDistance == EFogDistance.NEAR_AND_FAR); if (fogDistance == EFogDistance.FAR || fogDistance == EFogDistance.NEAR_AND_FAR) @@ -134,7 +134,7 @@ public class LodFogConfig } else { - heightFogHeight = Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogHeight.get().floatValue(); + heightFogHeight = Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogBaseHeight.get().floatValue(); } } } diff --git a/core/src/main/java/com/seibel/lod/core/render/renderer/LodRenderer.java b/core/src/main/java/com/seibel/lod/core/render/renderer/LodRenderer.java index 78cad9ddb..71a352aa0 100644 --- a/core/src/main/java/com/seibel/lod/core/render/renderer/LodRenderer.java +++ b/core/src/main/java/com/seibel/lod/core/render/renderer/LodRenderer.java @@ -20,7 +20,7 @@ package com.seibel.lod.core.render.renderer; import com.seibel.lod.core.config.Config; -import com.seibel.lod.api.enums.rendering.EDebugMode; +import com.seibel.lod.api.enums.rendering.EDebugRendering; import com.seibel.lod.api.enums.rendering.EFogColorMode; import com.seibel.lod.core.dependencyInjection.SingletonInjector; import com.seibel.lod.core.logging.ConfigBasedLogger; @@ -104,7 +104,7 @@ public class LodRenderer private static final IMinecraftClientWrapper MC = SingletonInjector.INSTANCE.get(IMinecraftClientWrapper.class); private static final IMinecraftRenderWrapper MC_RENDER = SingletonInjector.INSTANCE.get(IMinecraftRenderWrapper.class); - public EDebugMode previousDebugMode = null; + public EDebugRendering previousDebugMode = null; public final RenderBufferHandler bufferHandler; // The shader program @@ -314,7 +314,7 @@ public class LodRenderer { Color fogColor; - if (Config.Client.Advanced.Graphics.Fog.fogColorMode.get() == EFogColorMode.USE_SKY_COLOR) + if (Config.Client.Advanced.Graphics.Fog.colorMode.get() == EFogColorMode.USE_SKY_COLOR) fogColor = MC_RENDER.getSkyColor(); else fogColor = MC_RENDER.getFogColor(partialTicks); diff --git a/core/src/main/resources/assets/lod/lang/en_us.json b/core/src/main/resources/assets/lod/lang/en_us.json index fd591999b..91dfcc264 100644 --- a/core/src/main/resources/assets/lod/lang/en_us.json +++ b/core/src/main/resources/assets/lod/lang/en_us.json @@ -78,9 +78,9 @@ "lod.config.client.advanced.graphics.quality": "Render Quality", - "lod.config.client.advanced.graphics.quality.drawResolution": - "Draw Resolution", - "lod.config.client.advanced.graphics.quality.drawResolution.@tooltip": + "lod.config.client.advanced.graphics.quality.maxHorizontalResolution": + "Max Horizontal Resolution", + "lod.config.client.advanced.graphics.quality.maxHorizontalResolution.@tooltip": "The maximum detail LODs are rendered at.\n\n§6Fastest:§r Chunk\n§6Fanciest:§r Block", "lod.config.client.advanced.graphics.quality.lodChunkRenderDistance": "LOD Render Distance", @@ -121,17 +121,17 @@ "lod.config.client.advanced.graphics.fog": "Fog", - "lod.config.client.advanced.graphics.fog.fogDrawMode": + "lod.config.client.advanced.graphics.fog.drawMode": "Fog Draw Mode", - "lod.config.client.advanced.graphics.fog.fogDrawMode.@tooltip": + "lod.config.client.advanced.graphics.fog.drawMode.@tooltip": "When fog will be rendered on the LODs.", - "lod.config.client.advanced.graphics.fog.fogDistance": + "lod.config.client.advanced.graphics.fog.distance": "Fog Distance", - "lod.config.client.advanced.graphics.fog.fogDistance.@tooltip": + "lod.config.client.advanced.graphics.fog.distance.@tooltip": "The distance(s) Fog will be rendered on the LODs.", - "lod.config.client.advanced.graphics.fog.fogColorMode": + "lod.config.client.advanced.graphics.fog.colorMode": "Fog Color Mode", - "lod.config.client.advanced.graphics.fog.fogColorMode.@tooltip": + "lod.config.client.advanced.graphics.fog.colorMode.@tooltip": "The color of the fog on LODs.", "lod.config.client.advanced.graphics.fog.disableVanillaFog": "Disable Vanilla Fog", @@ -167,10 +167,7 @@ "lod.config.client.advanced.graphics.fog.advancedFog.heightFog": "Height Fog Options", - - "lod.config.client.advanced.graphics.fog.advancedFog.heightFog.heightFogConfigScreenNote": - "", - + "lod.config.client.advanced.graphics.fog.advancedFog.heightFog.heightFogMixMode": "Height Fog Mix Mode", "lod.config.client.advanced.graphics.fog.advancedFog.heightFog.heightFogMixMode.@tooltip": @@ -179,9 +176,9 @@ "Height Fog Mode", "lod.config.client.advanced.graphics.fog.advancedFog.heightFog.heightFogMode.@tooltip": "Where should the height fog be located? \n\nABOVE_CAMERA: Height fog starts from camera to the sky \nBELOW_CAMERA: Height fog starts from camera to the void \nABOVE_AND_BELOW_CAMERA: Height fog starts from camera to both the sky and the void \nABOVE_SET_HEIGHT: Height fog starts from a set height to the sky \nBELOW_SET_HEIGHT: Height fog starts from a set height to the void \nABOVE_AND_BELOW_SET_HEIGHT: Height fog starts from a set height to both the sky and the void \n", - "lod.config.client.advanced.graphics.fog.advancedFog.heightFog.heightFogHeight": - "Height Fog Set Height", - "lod.config.client.advanced.graphics.fog.advancedFog.heightFog.heightFogHeight.@tooltip": + "lod.config.client.advanced.graphics.fog.advancedFog.heightFog.heightFogBaseHeight": + "Height Fog Base Height", + "lod.config.client.advanced.graphics.fog.advancedFog.heightFog.heightFogBaseHeight.@tooltip": "If the height fog is calculated around a set height, what is that height position? ", "lod.config.client.advanced.graphics.fog.advancedFog.heightFog.heightFogStart": "Height Fog Start", @@ -212,9 +209,9 @@ "lod.config.client.advanced.graphics.noiseTextureSettings": "Noise Texture", - "lod.config.client.advanced.graphics.noiseTextureSettings.noiseEnable": + "lod.config.client.advanced.graphics.noiseTextureSettings.noiseEnabled": "Enable Noise Texture", - "lod.config.client.advanced.graphics.noiseTextureSettings.noiseEnable.@tooltip": + "lod.config.client.advanced.graphics.noiseTextureSettings.noiseEnabled.@tooltip": "If enabled a noise texture will be applied to LODs to simulate textures.", "lod.config.client.advanced.graphics.noiseTextureSettings.noiseSteps": "Noise Steps", @@ -291,9 +288,9 @@ "Server Folder Mode", "lod.config.client.multiplayer.serverFolderNameMode.@tooltip": "Determines the folder format for local multiplayer data.\n\n§6Name Only:§r\nUses the server browser name. Ex: \"Minecraft Server\"\n§6Name IP:§r\n\"Minecraft Server, IP 192.168.1.40\"\n§6Name, IP, Port:§r\n\"Minecraft Server, IP 192.168.1.40:25565\"\n§6Name, IP, Port, MC Version:§r\n\"Minecraft Server, IP 192.168.1.40:25565, GameVersion 1.18.1\"\n\n§c§lCaution:§r changing while connected to a multiplayer server may cause glitches.", - "lod.config.client.advanced.multiplayer.multiDimensionRequiredSimilarity": - "Multiverse Dimension Required Similarity", - "lod.config.client.multiplayer.multiDimensionRequiredSimilarity.@tooltip": + "lod.config.client.advanced.multiplayer.multiverseSimilarityRequiredPercent": + "Multiverse Required Similarity %", + "lod.config.client.advanced.multiplayer.multiverseSimilarityRequiredPercent.@tooltip": "When matching worlds of the same dimension type the\ntested chunk(s) must be at least this percent the same\nin order to be considered the same world.\n\nNote: If you use portals to enter a dimension at two\ndifferent locations this system may think it is two different worlds.\n\n§61.0:§r the chunks must be identical.\n§60.5:§r the chunks must be half the same.\n§60.0:§r disables multi-dimension support\n only one world will be used per dimension.", @@ -469,15 +466,15 @@ "lod.config.enum.EThreadPreset.I_PAID_FOR_THE_WHOLE_CPU": "I Paid For The Whole CPU", - "lod.config.enum.EHorizontalResolution.BLOCK": + "lod.config.enum.EMaxHorizontalResolution.BLOCK": "Block", - "lod.config.enum.EHorizontalResolution.TWO_BLOCKS": + "lod.config.enum.EMaxHorizontalResolution.TWO_BLOCKS": "2 blocks", - "lod.config.enum.EHorizontalResolution.FOUR_BLOCKS": + "lod.config.enum.EMaxHorizontalResolution.FOUR_BLOCKS": "4 blocks", - "lod.config.enum.EHorizontalResolution.HALF_CHUNK": + "lod.config.enum.EMaxHorizontalResolution.HALF_CHUNK": "Half a chunk", - "lod.config.enum.EHorizontalResolution.CHUNK": + "lod.config.enum.EMaxHorizontalResolution.CHUNK": "Chunk", "lod.config.enum.EVerticalQuality.HEIGHT_MAP": @@ -635,15 +632,15 @@ "lod.config.enum.ERendererMode.DISABLED": "Disabled", - "lod.config.enum.EDebugMode.OFF": + "lod.config.enum.EDebugRendering.OFF": "Off", - "lod.config.enum.EDebugMode.SHOW_DETAIL": + "lod.config.enum.EDebugRendering.SHOW_DETAIL": "Show detail", - "lod.config.enum.EDebugMode.SHOW_GENMODE": + "lod.config.enum.EDebugRendering.SHOW_GENMODE": "Show generation mode", - "lod.config.enum.EDebugMode.SHOW_OVERLAPPING_QUADS": + "lod.config.enum.EDebugRendering.SHOW_OVERLAPPING_QUADS": "Show overlapping quads", - "lod.config.enum.EDebugMode.SHOW_RENDER_SOURCE_FLAG": + "lod.config.enum.EDebugRendering.SHOW_RENDER_SOURCE_FLAG": "Show render source flag", "lod.config.enum.ELoggerMode.DISABLED":