From b4b7738aa64e23a0282994a3c9e7558766a8b40e Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 6 Apr 2024 10:06:03 -0500 Subject: [PATCH] Fix API enums missing "DhApi" prefix and remove unused Enums/code --- .../api/enums/config/EBufferRebuildTimes.java | 56 --- ...sToAvoid.java => EDhApiBlocksToAvoid.java} | 7 +- ...de.java => EDhApiGLErrorHandlingMode.java} | 5 +- ...fileMode.java => EDhApiGlProfileMode.java} | 5 +- ...Method.java => EDhApiGpuUploadMethod.java} | 8 +- ...lity.java => EDhApiHorizontalQuality.java} | 7 +- ...ELodShading.java => EDhApiLodShading.java} | 4 +- ...ELoggerMode.java => EDhApiLoggerMode.java} | 10 +- ...ava => EDhApiMaxHorizontalResolution.java} | 26 +- ...e.java => EDhApiServerFolderNameMode.java} | 6 +- .../api/enums/config/EDhApiUpdateBranch.java | 14 + ...erdraw.java => EDhApiVanillaOverdraw.java} | 5 +- ...uality.java => EDhApiVerticalQuality.java} | 8 +- .../api/enums/config/EGenerationPriority.java | 48 --- .../enums/config/ELightGenerationMode.java | 40 --- .../api/enums/config/EOverdrawPrevention.java | 51 --- .../api/enums/config/EUpdateBranch.java | 7 - ...tyPreset.java => EDhApiQualityPreset.java} | 5 +- ...eadPreset.java => EDhApiThreadPreset.java} | 7 +- ...ndering.java => EDhApiDebugRendering.java} | 16 +- ...ColorMode.java => EDhApiFogColorMode.java} | 7 +- ...ogDistance.java => EDhApiFogDistance.java} | 5 +- ...ogDrawMode.java => EDhApiFogDrawMode.java} | 4 +- ...EFogFalloff.java => EDhApiFogFalloff.java} | 6 +- ...xMode.java => EDhApiHeightFogMixMode.java} | 6 +- ...tFogMode.java => EDhApiHeightFogMode.java} | 8 +- ...dererMode.java => EDhApiRendererMode.java} | 10 +- ...nsparency.java => EDhApiTransparency.java} | 7 +- .../both/IDhApiWorldGenerationConfig.java | 1 - .../client/IDhApiAmbientOcclusionConfig.java | 3 - .../config/client/IDhApiDebuggingConfig.java | 4 +- .../config/client/IDhApiFarFogConfig.java | 5 +- .../config/client/IDhApiFogConfig.java | 13 +- .../config/client/IDhApiGpuBuffersConfig.java | 4 +- .../config/client/IDhApiGraphicsConfig.java | 30 +- .../config/client/IDhApiHeightFogConfig.java | 12 +- .../client/IDhApiMultiplayerConfig.java | 4 +- .../RenderModeEnabledConverter.java | 12 +- .../config/client/DhApiDebuggingConfig.java | 6 +- .../config/client/DhApiFarFogConfig.java | 6 +- .../methods/config/client/DhApiFogConfig.java | 12 +- .../config/client/DhApiGpuBuffersConfig.java | 4 +- .../config/client/DhApiGraphicsConfig.java | 37 +- .../config/client/DhApiHeightFogConfig.java | 18 +- .../config/client/DhApiMultiplayerConfig.java | 6 +- .../common/DhApiWorldGenerationConfig.java | 1 - .../core/api/internal/ClientApi.java | 15 +- .../distanthorizons/core/config/Config.java | 322 +++++++----------- .../DebugColumnConfigEventHandler.java | 16 - .../QuickRenderToggleConfigEventHandler.java | 10 +- .../RenderCacheConfigEventHandler.java | 21 +- ...rawPreventionPresetConfigEventHandler.java | 86 ----- ...RenderQualityPresetConfigEventHandler.java | 90 ++--- .../ThreadPresetConfigEventHandler.java | 124 +++---- .../core/config/gui/OpenGLConfigScreen.java | 4 +- .../bufferBuilding/ColumnRenderBuffer.java | 13 +- .../ColumnRenderBufferBuilder.java | 4 +- .../bufferBuilding/CubicLodTemplate.java | 10 +- .../render/bufferBuilding/LodQuadBuilder.java | 6 +- .../FullDataToRenderDataTransformer.java | 4 +- .../structure/ClientOnlySaveStructure.java | 4 +- .../core/level/ClientLevelModule.java | 6 +- .../core/logging/ConfigBasedLogger.java | 10 +- .../core/logging/ConfigBasedSpamLogger.java | 10 +- .../core/render/LodQuadTree.java | 6 +- .../core/render/fog/FogSettings.java | 8 +- .../core/render/fog/LodFogConfig.java | 30 +- .../core/render/glObject/GLProxy.java | 30 +- .../core/render/glObject/buffer/GLBuffer.java | 8 +- .../glObject/buffer/GLVertexBuffer.java | 8 +- .../glObject/buffer/QuadElementBuffer.java | 6 +- .../core/render/renderer/DebugRenderer.java | 12 +- .../core/render/renderer/LodRenderer.java | 10 +- .../core/render/renderer/ScreenQuad.java | 4 +- .../core/render/renderer/TestRenderer.java | 10 +- .../render/renderer/shaders/FogShader.java | 5 +- .../distanthorizons/core/util/LodUtil.java | 9 +- .../modAccessor/AbstractOptifineAccessor.java | 10 +- .../modAccessor/IOptifineAccessor.java | 4 +- .../assets/distanthorizons/lang/en_us.json | 244 ++++++------- 80 files changed, 671 insertions(+), 1054 deletions(-) delete mode 100644 api/src/main/java/com/seibel/distanthorizons/api/enums/config/EBufferRebuildTimes.java rename api/src/main/java/com/seibel/distanthorizons/api/enums/config/{EBlocksToAvoid.java => EDhApiBlocksToAvoid.java} (87%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/config/{EGLErrorHandlingMode.java => EDhApiGLErrorHandlingMode.java} (91%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/config/{EGlProfileMode.java => EDhApiGlProfileMode.java} (92%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/config/{EGpuUploadMethod.java => EDhApiGpuUploadMethod.java} (92%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/config/{EHorizontalQuality.java => EDhApiHorizontalQuality.java} (91%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/config/{ELodShading.java => EDhApiLodShading.java} (96%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/config/{ELoggerMode.java => EDhApiLoggerMode.java} (92%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/config/{EMaxHorizontalResolution.java => EDhApiMaxHorizontalResolution.java} (80%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/config/{EServerFolderNameMode.java => EDhApiServerFolderNameMode.java} (95%) create mode 100644 api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiUpdateBranch.java rename api/src/main/java/com/seibel/distanthorizons/api/enums/config/{EVanillaOverdraw.java => EDhApiVanillaOverdraw.java} (95%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/config/{EVerticalQuality.java => EDhApiVerticalQuality.java} (91%) delete mode 100644 api/src/main/java/com/seibel/distanthorizons/api/enums/config/EGenerationPriority.java delete mode 100644 api/src/main/java/com/seibel/distanthorizons/api/enums/config/ELightGenerationMode.java delete mode 100644 api/src/main/java/com/seibel/distanthorizons/api/enums/config/EOverdrawPrevention.java delete mode 100644 api/src/main/java/com/seibel/distanthorizons/api/enums/config/EUpdateBranch.java rename api/src/main/java/com/seibel/distanthorizons/api/enums/config/quickOptions/{EQualityPreset.java => EDhApiQualityPreset.java} (94%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/config/quickOptions/{EThreadPreset.java => EDhApiThreadPreset.java} (92%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/{EDebugRendering.java => EDhApiDebugRendering.java} (86%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/{EFogColorMode.java => EDhApiFogColorMode.java} (95%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/{EFogDistance.java => EDhApiFogDistance.java} (94%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/{EFogDrawMode.java => EDhApiFogDrawMode.java} (96%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/{EFogFalloff.java => EDhApiFogFalloff.java} (93%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/{EHeightFogMixMode.java => EDhApiHeightFogMixMode.java} (94%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/{EHeightFogMode.java => EDhApiHeightFogMode.java} (91%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/{ERendererMode.java => EDhApiRendererMode.java} (87%) rename api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/{ETransparency.java => EDhApiTransparency.java} (89%) delete mode 100644 core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/OverdrawPreventionPresetConfigEventHandler.java diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EBufferRebuildTimes.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EBufferRebuildTimes.java deleted file mode 100644 index b34c005c7..000000000 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EBufferRebuildTimes.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This file is part of the Distant Horizons mod - * licensed under the GNU LGPL v3 License. - * - * Copyright (C) 2020-2023 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.distanthorizons.api.enums.config; - -/** - * CONSTANT
- * FREQUENT
- * NORMAL
- * RARE

- * - * Determines how fast the buffers should be regenerated - * - * @author Leonardo Amato - * @version 9-25-2021 - */ -@Deprecated // not currently in use, if the config this enum represents is re-implemented, the deprecated flag can be removed -public enum EBufferRebuildTimes -{ - CONSTANT(0, 0, 0, 1), - - FREQUENT(1000, 500, 2500, 1), - - NORMAL(2000, 1000, 5000, 4), - - RARE(5000, 2000, 10000, 16); - - public final int playerMoveTimeout; - public final int renderedChunkTimeout; - public final int chunkChangeTimeout; - public final int playerMoveDistance; - - EBufferRebuildTimes(int playerMoveTimeout, int renderedChunkTimeout, int chunkChangeTimeout, int playerMoveDistance) - { - this.playerMoveTimeout = playerMoveTimeout; - this.renderedChunkTimeout = renderedChunkTimeout; - this.chunkChangeTimeout = chunkChangeTimeout; - this.playerMoveDistance = playerMoveDistance; - } -} diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EBlocksToAvoid.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiBlocksToAvoid.java similarity index 87% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/config/EBlocksToAvoid.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiBlocksToAvoid.java index 2f26d3d71..92388135d 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EBlocksToAvoid.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiBlocksToAvoid.java @@ -23,9 +23,10 @@ package com.seibel.distanthorizons.api.enums.config; * NONE,
* NON_COLLIDING,
* - * @since API 1.0.0 + * @since API 1.1.0 + * @version 2024-4-6 */ -public enum EBlocksToAvoid +public enum EDhApiBlocksToAvoid { // Reminder: // when adding items up the API minor version @@ -36,6 +37,6 @@ public enum EBlocksToAvoid public final boolean noCollision; - EBlocksToAvoid(boolean noCollision) { this.noCollision = noCollision; } + EDhApiBlocksToAvoid(boolean noCollision) { this.noCollision = noCollision; } } \ No newline at end of file diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EGLErrorHandlingMode.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiGLErrorHandlingMode.java similarity index 91% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/config/EGLErrorHandlingMode.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiGLErrorHandlingMode.java index 00719a140..5e5013613 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EGLErrorHandlingMode.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiGLErrorHandlingMode.java @@ -20,9 +20,10 @@ package com.seibel.distanthorizons.api.enums.config; /** - * @since API 1.0.0 + * @since API 1.1.0 + * @version 2024-4-6 */ -public enum EGLErrorHandlingMode +public enum EDhApiGLErrorHandlingMode { IGNORE, LOG, diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EGlProfileMode.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiGlProfileMode.java similarity index 92% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/config/EGlProfileMode.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiGlProfileMode.java index b4247d66f..3e383e758 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EGlProfileMode.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiGlProfileMode.java @@ -20,9 +20,10 @@ package com.seibel.distanthorizons.api.enums.config; /** - * @since API 1.0.0 + * @since API 1.1.0 + * @version 2024-4-6 */ -public enum EGlProfileMode +public enum EDhApiGlProfileMode { CORE, COMPAT, diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EGpuUploadMethod.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiGpuUploadMethod.java similarity index 92% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/config/EGpuUploadMethod.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiGpuUploadMethod.java index d87d8738d..8f3f5ec9c 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EGpuUploadMethod.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiGpuUploadMethod.java @@ -28,10 +28,10 @@ package com.seibel.distanthorizons.api.enums.config; * * @author Leetom * @author James Seibel - * @version 2022-7-2 - * @since API 1.0.0 + * @version 2024-4-6 + * @since API 1.1.0 */ -public enum EGpuUploadMethod +public enum EDhApiGpuUploadMethod { /** Picks the best option based on the GPU the user has. */ AUTO(false, false), @@ -60,7 +60,7 @@ public enum EGpuUploadMethod public final boolean useEarlyMapping; public final boolean useBufferStorage; - EGpuUploadMethod(boolean useEarlyMapping, boolean useBufferStorage) + EDhApiGpuUploadMethod(boolean useEarlyMapping, boolean useBufferStorage) { this.useEarlyMapping = useEarlyMapping; this.useBufferStorage = useBufferStorage; diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EHorizontalQuality.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiHorizontalQuality.java similarity index 91% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/config/EHorizontalQuality.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiHorizontalQuality.java index b180498d5..5ac005504 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EHorizontalQuality.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiHorizontalQuality.java @@ -26,9 +26,10 @@ package com.seibel.distanthorizons.api.enums.config; * HIGH
* UNLIMITED
* - * @since API 1.0.0 + * @since API 1.1.0 + * @version 2024-4-6 */ -public enum EHorizontalQuality +public enum EDhApiHorizontalQuality { // Reminder: // when adding items up the API minor version @@ -55,7 +56,7 @@ public enum EHorizontalQuality public final double quadraticBase; public final int distanceUnitInBlocks; - EHorizontalQuality(double quadraticBase, int distanceUnitInBlocks) + EDhApiHorizontalQuality(double quadraticBase, int distanceUnitInBlocks) { this.quadraticBase = quadraticBase; this.distanceUnitInBlocks = distanceUnitInBlocks; diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/ELodShading.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiLodShading.java similarity index 96% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/config/ELodShading.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiLodShading.java index 125a26d6f..bfab3f7dc 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/ELodShading.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiLodShading.java @@ -24,10 +24,10 @@ package com.seibel.distanthorizons.api.enums.config; * OLD_LIGHTING
* NONE
* - * @since API 1.0.0 + * @since API 1.1.0 * @version 2024-4-6 */ -public enum ELodShading +public enum EDhApiLodShading { // Reminder: // when adding items up the API minor version diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/ELoggerMode.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiLoggerMode.java similarity index 92% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/config/ELoggerMode.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiLoggerMode.java index 3a16c88ed..eb9043a2e 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/ELoggerMode.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiLoggerMode.java @@ -22,9 +22,10 @@ package com.seibel.distanthorizons.api.enums.config; import org.apache.logging.log4j.Level; /** - * @since API 1.0.0 + * @since API 1.1.0 + * @version 2024-4-6 */ -public enum ELoggerMode +public enum EDhApiLoggerMode { DISABLED(Level.OFF, Level.OFF), LOG_ALL_TO_FILE(Level.ALL, Level.OFF), @@ -40,11 +41,14 @@ public enum ELoggerMode LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE(Level.INFO, Level.WARN), LOG_ERROR_TO_CHAT_AND_INFO_TO_FILE(Level.INFO, Level.ERROR), ; + public final Level levelForFile; public final Level levelForChat; - ELoggerMode(Level levelForFile, Level levelForChat) + + EDhApiLoggerMode(Level levelForFile, Level levelForChat) { this.levelForFile = levelForFile; this.levelForChat = levelForChat; } + } diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EMaxHorizontalResolution.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiMaxHorizontalResolution.java similarity index 80% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/config/EMaxHorizontalResolution.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiMaxHorizontalResolution.java index e9139c20b..922932c1b 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EMaxHorizontalResolution.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiMaxHorizontalResolution.java @@ -33,10 +33,10 @@ import com.seibel.distanthorizons.coreapi.util.MathUtil; * * @author James Seibel * @author Leonardo Amato - * @version 2023-6-14 - * @since API 1.0.0 + * @since API 1.1.0 + * @version 2024-4-6 */ -public enum EMaxHorizontalResolution +public enum EDhApiMaxHorizontalResolution { /** render 256 LODs for each chunk */ BLOCK(16, 0), @@ -84,12 +84,12 @@ public enum EMaxHorizontalResolution * 2nd dimension: An array of all LodDetails that are less than or
* equal to that detailLevel */ - private static EMaxHorizontalResolution[][] lowerDetailArrays; + private static EDhApiMaxHorizontalResolution[][] lowerDetailArrays; - EMaxHorizontalResolution(int newLengthCount, int newDetailLevel) + EDhApiMaxHorizontalResolution(int newLengthCount, int newDetailLevel) { this.detailLevel = (byte) newDetailLevel; this.dataPointLengthCount = newLengthCount; @@ -129,20 +129,20 @@ public enum EMaxHorizontalResolution * Returns an array of all LodDetails that have a detail level * that is less than or equal to the given LodDetail */ - public static EMaxHorizontalResolution[] getSelfAndLowerDetails(EMaxHorizontalResolution detail) + public static EDhApiMaxHorizontalResolution[] getSelfAndLowerDetails(EDhApiMaxHorizontalResolution detail) { if (lowerDetailArrays == null) { // run first time setup - lowerDetailArrays = new EMaxHorizontalResolution[EMaxHorizontalResolution.values().length][]; + lowerDetailArrays = new EDhApiMaxHorizontalResolution[EDhApiMaxHorizontalResolution.values().length][]; // go through each LodDetail - for (EMaxHorizontalResolution currentDetail : EMaxHorizontalResolution.values()) + for (EDhApiMaxHorizontalResolution currentDetail : EDhApiMaxHorizontalResolution.values()) { - ArrayList lowerDetails = new ArrayList<>(); + ArrayList lowerDetails = new ArrayList<>(); // find the details lower than currentDetail - for (EMaxHorizontalResolution compareDetail : EMaxHorizontalResolution.values()) + for (EDhApiMaxHorizontalResolution compareDetail : EDhApiMaxHorizontalResolution.values()) { if (currentDetail.detailLevel <= compareDetail.detailLevel) { @@ -154,7 +154,7 @@ public enum EMaxHorizontalResolution Collections.sort(lowerDetails); Collections.reverse(lowerDetails); - lowerDetailArrays[currentDetail.detailLevel] = lowerDetails.toArray(new EMaxHorizontalResolution[lowerDetails.size()]); + lowerDetailArrays[currentDetail.detailLevel] = lowerDetails.toArray(new EDhApiMaxHorizontalResolution[lowerDetails.size()]); } } @@ -162,9 +162,9 @@ public enum EMaxHorizontalResolution } /** Returns what detail level should be used at a given distance and maxDistance. */ - public static EMaxHorizontalResolution getDetailForDistance(EMaxHorizontalResolution maxDetailLevel, int distance, int maxDistance) + public static EDhApiMaxHorizontalResolution getDetailForDistance(EDhApiMaxHorizontalResolution maxDetailLevel, int distance, int maxDistance) { - EMaxHorizontalResolution[] lowerDetails = getSelfAndLowerDetails(maxDetailLevel); + EDhApiMaxHorizontalResolution[] 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/distanthorizons/api/enums/config/EServerFolderNameMode.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiServerFolderNameMode.java similarity index 95% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/config/EServerFolderNameMode.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiServerFolderNameMode.java index de7e9dcec..69a8ea619 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EServerFolderNameMode.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiServerFolderNameMode.java @@ -30,10 +30,10 @@ package com.seibel.distanthorizons.api.enums.config; * Determines how the multiplayer folders should be named. * * @author James Seibel - * @version 2024-4-2 - * @since API 1.0.0 + * @since API 1.1.0 + * @version 2024-4-6 */ -public enum EServerFolderNameMode +public enum EDhApiServerFolderNameMode { // Reminder: // when adding items up the API minor version diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiUpdateBranch.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiUpdateBranch.java new file mode 100644 index 000000000..e7eab618f --- /dev/null +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiUpdateBranch.java @@ -0,0 +1,14 @@ +package com.seibel.distanthorizons.api.enums.config; + +/** + * STABLE,
+ * NIGHTLY,

+ * + * @since API 1.1.0 + * @version 2024-4-6 + */ +public enum EDhApiUpdateBranch +{ + STABLE, + NIGHTLY +} diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EVanillaOverdraw.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiVanillaOverdraw.java similarity index 95% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/config/EVanillaOverdraw.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiVanillaOverdraw.java index c9f9124ab..ed321d493 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EVanillaOverdraw.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiVanillaOverdraw.java @@ -28,10 +28,11 @@ package com.seibel.distanthorizons.api.enums.config; * the vanilla Minecraft terrain. * * @author James Seibel - * @version 2022-6-30 + * @since API 1.1.0 + * @version 2024-4-6 */ @Deprecated // not currently in use, if the config this enum represents is re-implemented, the deprecated flag can be removed -public enum EVanillaOverdraw +public enum EDhApiVanillaOverdraw { // Reminder: // when adding items up the API minor version diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EVerticalQuality.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiVerticalQuality.java similarity index 91% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/config/EVerticalQuality.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiVerticalQuality.java index 6f2d89040..0917ab82b 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EVerticalQuality.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EDhApiVerticalQuality.java @@ -29,10 +29,10 @@ import com.seibel.distanthorizons.coreapi.util.MathUtil; * EXTREME
* * @author Leonardo Amato - * @version 2023-2-5 - * @since API 1.0.0 + * @version 2024-4-6 + * @since API 1.1.0 */ -public enum EVerticalQuality +public enum EDhApiVerticalQuality { HEIGHT_MAP( new int[]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}), LOW( new int[]{4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1}), @@ -47,7 +47,7 @@ public enum EVerticalQuality - EVerticalQuality(int[] maxVerticalData) { this.maxVerticalData = maxVerticalData; } + EDhApiVerticalQuality(int[] maxVerticalData) { this.maxVerticalData = maxVerticalData; } diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EGenerationPriority.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EGenerationPriority.java deleted file mode 100644 index 39271c3ee..000000000 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EGenerationPriority.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * This file is part of the Distant Horizons mod - * licensed under the GNU LGPL v3 License. - * - * Copyright (C) 2020-2023 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.distanthorizons.api.enums.config; - -/** - * AUTO
- * Near_First
- * Far_First

- * - * Determines which LODs should have priority when generating - * outside the normal view distance. - * - * @author Leonardo Amato - * @version 12-1-2021 - */ -@Deprecated // not currently in use, if the config this enum represents is re-implemented, the deprecated flag can be removed -public enum EGenerationPriority -{ - // Reminder: - // when adding items up the API minor version - // when removing items up the API major version - - /** NEAR_FIRST when connected to servers and BALANCED when on single player */ - AUTO, - - NEAR_FIRST, - - BALANCED, - - FAR_FIRST -} diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/ELightGenerationMode.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/ELightGenerationMode.java deleted file mode 100644 index cc57d08b7..000000000 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/ELightGenerationMode.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This file is part of the Distant Horizons mod - * licensed under the GNU LGPL v3 License. - * - * Copyright (C) 2020-2023 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.distanthorizons.api.enums.config; - -/** - * DISTANT_HORIZONS,
- * MINECRAFT, - * - * @author Leetom - * @version 2023-6-7 - * @since API 1.0.0 - */ -public enum ELightGenerationMode -{ - // Reminder: - // when adding items up the API minor version - // when removing items up the API major version - - DISTANT_HORIZONS, - - MINECRAFT - -} diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EOverdrawPrevention.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EOverdrawPrevention.java deleted file mode 100644 index 46f82868b..000000000 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EOverdrawPrevention.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of the Distant Horizons mod - * licensed under the GNU LGPL v3 License. - * - * Copyright (C) 2020-2023 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.distanthorizons.api.enums.config; - -/** - * NONE
- * LIGHT
- * MEDIUM
- * HEAVY
- * - * CUSTOM
- * - * @since API 1.0.0 - * @deprecated will be removed when DH updates to MC 1.21
- * After removal a float value will be used to control overdraw instead. - */ -@Deprecated -public enum EOverdrawPrevention -{ - // Reminder: - // when adding items up the API minor version - // when removing items up the API major version - - NONE, - LIGHT, - MEDIUM, - HEAVY, - - /** - * Should not be passed in.
- * Is returned if the overdraw value doesn't match any of the enums defined here. - */ - CUSTOM; -} diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EUpdateBranch.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EUpdateBranch.java deleted file mode 100644 index 09da806d5..000000000 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/EUpdateBranch.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.seibel.distanthorizons.api.enums.config; - -public enum EUpdateBranch -{ - STABLE, - NIGHTLY -} diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/quickOptions/EQualityPreset.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/quickOptions/EDhApiQualityPreset.java similarity index 94% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/config/quickOptions/EQualityPreset.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/config/quickOptions/EDhApiQualityPreset.java index 7936f3176..7bca56868 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/quickOptions/EQualityPreset.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/quickOptions/EDhApiQualityPreset.java @@ -30,9 +30,10 @@ import com.seibel.distanthorizons.api.enums.config.DisallowSelectingViaConfigGui * HIGH,
* EXTREME,
* - * @since API 1.0.0 + * @since API 1.1.0 + * @version 2024-4-6 */ -public enum EQualityPreset +public enum EDhApiQualityPreset { // Reminder: // when adding items up the API minor version diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/quickOptions/EThreadPreset.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/quickOptions/EDhApiThreadPreset.java similarity index 92% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/config/quickOptions/EThreadPreset.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/config/quickOptions/EDhApiThreadPreset.java index 8773ff1a4..b10468e4f 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/config/quickOptions/EThreadPreset.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/config/quickOptions/EDhApiThreadPreset.java @@ -29,9 +29,10 @@ import com.seibel.distanthorizons.api.enums.config.DisallowSelectingViaConfigGui * BALANCED,
* AGGRESSIVE,
* - * @since API 1.0.0 + * @since API 1.1.0 + * @version 2024-4-6 */ -public enum EThreadPreset +public enum EDhApiThreadPreset { // Reminder: // when adding items up the API minor version @@ -44,8 +45,6 @@ public enum EThreadPreset LOW_IMPACT, BALANCED, AGGRESSIVE, - - // temporarily removed due to stability concerns I_PAID_FOR_THE_WHOLE_CPU, } \ No newline at end of file diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDebugRendering.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiDebugRendering.java similarity index 86% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDebugRendering.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiDebugRendering.java index 62ee27786..646f9f25a 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDebugRendering.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiDebugRendering.java @@ -28,10 +28,10 @@ package com.seibel.distanthorizons.api.enums.rendering; * * @author Leetom * @author James Seibel - * @version 2023-6-7 - * @since API 1.0.0 + * @version 2024-4-6 + * @since API 1.1.0 */ -public enum EDebugRendering +public enum EDhApiDebugRendering { // Reminder: // when adding items up the API minor version @@ -44,10 +44,6 @@ public enum EDebugRendering /** LOD colors are based on their detail */ SHOW_DETAIL, - @Deprecated - /** LOD colors are based on their gen mode. */ - SHOW_GENMODE, - /** Block Materials are often used by Iris shaders to determine how LODs should be rendered */ SHOW_BLOCK_MATERIAL, @@ -58,7 +54,7 @@ public enum EDebugRendering SHOW_RENDER_SOURCE_FLAG; - public static EDebugRendering next(EDebugRendering type) + public static EDhApiDebugRendering next(EDhApiDebugRendering type) { switch (type) { @@ -75,7 +71,7 @@ public enum EDebugRendering } } - public static EDebugRendering previous(EDebugRendering type) + public static EDhApiDebugRendering previous(EDhApiDebugRendering type) { switch (type) { @@ -84,8 +80,6 @@ public enum EDebugRendering case SHOW_RENDER_SOURCE_FLAG: return SHOW_OVERLAPPING_QUADS; case SHOW_OVERLAPPING_QUADS: - return SHOW_GENMODE; - case SHOW_GENMODE: return SHOW_DETAIL; default: return OFF; diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EFogColorMode.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiFogColorMode.java similarity index 95% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EFogColorMode.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiFogColorMode.java index ab0831d49..8900574c5 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EFogColorMode.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiFogColorMode.java @@ -24,10 +24,10 @@ package com.seibel.distanthorizons.api.enums.rendering; * USE_SKY_COLOR,
* * @author James Seibel - * @version 2022-6-9 - * @since API 1.0.0 + * @version 2024-4-6 + * @since API 1.1.0 */ -public enum EFogColorMode +public enum EDhApiFogColorMode { // Reminder: // when adding items: up the API minor version @@ -44,4 +44,5 @@ public enum EFogColorMode * https://www.curseforge.com/minecraft/mc-mods/clear-skies-forge-port */ USE_SKY_COLOR, + } diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EFogDistance.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiFogDistance.java similarity index 94% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EFogDistance.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiFogDistance.java index 5196ad696..d7b585802 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EFogDistance.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiFogDistance.java @@ -26,9 +26,10 @@ package com.seibel.distanthorizons.api.enums.rendering; * * @author James Seibel * @version 2022-6-2 - * @since API 1.0.0 + * @since API 1.1.0 */ -public enum EFogDistance +@Deprecated +public enum EDhApiFogDistance { // Reminder: // when adding items up the API minor version diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EFogDrawMode.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiFogDrawMode.java similarity index 96% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EFogDrawMode.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiFogDrawMode.java index 83c732142..1bc322109 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EFogDrawMode.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiFogDrawMode.java @@ -25,10 +25,10 @@ package com.seibel.distanthorizons.api.enums.rendering; * FOG_DISABLED
* * @author James Seibel + * @since API 1.1.0 * @version 2022-6-2 - * @since API 1.0.0 */ -public enum EFogDrawMode +public enum EDhApiFogDrawMode { // Reminder: // when adding items up the API minor version diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EFogFalloff.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiFogFalloff.java similarity index 93% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EFogFalloff.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiFogFalloff.java index c1de07ece..4f310bf17 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EFogFalloff.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiFogFalloff.java @@ -26,9 +26,9 @@ package com.seibel.distanthorizons.api.enums.rendering; * * @author Leetom * @version 2022-6-30 - * @since API 1.0.0 + * @since API 1.1.0 */ -public enum EFogFalloff +public enum EDhApiFogFalloff { // Reminder: // when adding items up the API minor version @@ -38,5 +38,5 @@ public enum EFogFalloff LINEAR, EXPONENTIAL, EXPONENTIAL_SQUARED, - // TEXTURE_BASED, // TODO: Impl this + } diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EHeightFogMixMode.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiHeightFogMixMode.java similarity index 94% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EHeightFogMixMode.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiHeightFogMixMode.java index b688ebda8..13ab79dbb 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EHeightFogMixMode.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiHeightFogMixMode.java @@ -32,10 +32,10 @@ package com.seibel.distanthorizons.api.enums.rendering; * AVERAGE
* * @author Leetom - * @version 2022-4-14 - * @since API 1.0.0 + * @version 2024-4-6 + * @since API 1.1.0 */ -public enum EHeightFogMixMode +public enum EDhApiHeightFogMixMode { BASIC, IGNORE_HEIGHT, diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EHeightFogMode.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiHeightFogMode.java similarity index 91% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EHeightFogMode.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiHeightFogMode.java index 5aebcc8cd..99e538603 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EHeightFogMode.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiHeightFogMode.java @@ -28,10 +28,10 @@ package com.seibel.distanthorizons.api.enums.rendering; * ABOVE_AND_BELOW_SET_HEIGHT,
* * @author Leetom - * @version 6-30-2022 - * @since API 1.0.0 + * @version 2024-4-6 + * @since API 1.1.0 */ -public enum EHeightFogMode +public enum EDhApiHeightFogMode { // Reminder: // when adding items up the API minor version @@ -49,7 +49,7 @@ public enum EHeightFogMode public final boolean above; public final boolean below; - EHeightFogMode(boolean basedOnCamera, boolean above, boolean below) + EDhApiHeightFogMode(boolean basedOnCamera, boolean above, boolean below) { this.basedOnCamera = basedOnCamera; this.above = above; diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/ERendererMode.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiRendererMode.java similarity index 87% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/ERendererMode.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiRendererMode.java index a6a9c6c85..87a7099b1 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/ERendererMode.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiRendererMode.java @@ -24,10 +24,10 @@ package com.seibel.distanthorizons.api.enums.rendering; * Debug
* Disabled
* - * @version 2022-6-2 - * @since API 1.0.0 + * @since API 1.1.0 + * @version 2024-4-6 */ -public enum ERendererMode +public enum EDhApiRendererMode { // Reminder: // when adding items up the API minor version @@ -40,7 +40,7 @@ public enum ERendererMode /** Used by the config GUI to cycle through the available rendering options */ - public static ERendererMode next(ERendererMode type) + public static EDhApiRendererMode next(EDhApiRendererMode type) { switch (type) { @@ -54,7 +54,7 @@ public enum ERendererMode } /** Used by the config GUI to cycle through the available rendering options */ - public static ERendererMode previous(ERendererMode type) + public static EDhApiRendererMode previous(EDhApiRendererMode type) { switch (type) { diff --git a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/ETransparency.java b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiTransparency.java similarity index 89% rename from api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/ETransparency.java rename to api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiTransparency.java index aefc14473..495c8fe6e 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/ETransparency.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/enums/rendering/EDhApiTransparency.java @@ -24,9 +24,10 @@ package com.seibel.distanthorizons.api.enums.rendering; * FAKE,
* COMPLETE,
* - * @since API 1.0.0 + * @since API 1.1.0 + * @version 2024-4-6 */ -public enum ETransparency +public enum EDhApiTransparency { // Reminder: // when adding items up the API minor version @@ -40,7 +41,7 @@ public enum ETransparency public final boolean transparencyEnabled; public final boolean fakeTransparencyEnabled; - ETransparency(boolean transparencyEnabled, boolean fakeTransparencyEnabled) + EDhApiTransparency(boolean transparencyEnabled, boolean fakeTransparencyEnabled) { this.transparencyEnabled = transparencyEnabled; this.fakeTransparencyEnabled = fakeTransparencyEnabled; diff --git a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/both/IDhApiWorldGenerationConfig.java b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/both/IDhApiWorldGenerationConfig.java index d52733634..9ea48a2ac 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/both/IDhApiWorldGenerationConfig.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/both/IDhApiWorldGenerationConfig.java @@ -19,7 +19,6 @@ package com.seibel.distanthorizons.api.interfaces.config.both; -import com.seibel.distanthorizons.api.enums.config.ELightGenerationMode; import com.seibel.distanthorizons.api.enums.worldGeneration.EDhApiDistantGeneratorMode; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup; diff --git a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiAmbientOcclusionConfig.java b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiAmbientOcclusionConfig.java index d20bac76e..8be9af11a 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiAmbientOcclusionConfig.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiAmbientOcclusionConfig.java @@ -19,9 +19,6 @@ package com.seibel.distanthorizons.api.interfaces.config.client; -import com.seibel.distanthorizons.api.enums.rendering.EFogColorMode; -import com.seibel.distanthorizons.api.enums.rendering.EFogDistance; -import com.seibel.distanthorizons.api.enums.rendering.EFogDrawMode; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; diff --git a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiDebuggingConfig.java b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiDebuggingConfig.java index 18f2aea84..ad45b6d61 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiDebuggingConfig.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiDebuggingConfig.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.api.interfaces.config.client; -import com.seibel.distanthorizons.api.enums.rendering.EDebugRendering; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiDebugRendering; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup; @@ -33,7 +33,7 @@ import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup; public interface IDhApiDebuggingConfig extends IDhApiConfigGroup { /** Can be used to debug the standard fake chunk rendering. */ - IDhApiConfigValue debugRendering(); + IDhApiConfigValue debugRendering(); /** If enabled debug keybindings can be used. */ IDhApiConfigValue debugKeybindings(); diff --git a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiFarFogConfig.java b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiFarFogConfig.java index 95f0d0a3d..e50e76cff 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiFarFogConfig.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiFarFogConfig.java @@ -19,8 +19,7 @@ package com.seibel.distanthorizons.api.interfaces.config.client; -import com.seibel.distanthorizons.api.enums.rendering.EFogFalloff; -import com.seibel.distanthorizons.api.enums.rendering.*; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogFalloff; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; @@ -64,7 +63,7 @@ public interface IDhApiFarFogConfig extends IDhApiConfigGroup IDhApiConfigValue farFogMaxThickness(); /** Defines how the fog changes in thickness. */ - IDhApiConfigValue farFogFalloff(); + IDhApiConfigValue farFogFalloff(); /** Defines the fog density. */ IDhApiConfigValue farFogDensity(); diff --git a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiFogConfig.java b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiFogConfig.java index f7ad27c84..e976ef8ad 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiFogConfig.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiFogConfig.java @@ -19,10 +19,9 @@ package com.seibel.distanthorizons.api.interfaces.config.client; -import com.seibel.distanthorizons.api.enums.rendering.EFogColorMode; -import com.seibel.distanthorizons.api.enums.rendering.EFogDistance; -import com.seibel.distanthorizons.api.enums.rendering.EFogDrawMode; -import com.seibel.distanthorizons.api.enums.rendering.*; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogColorMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogDistance; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogDrawMode; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; @@ -59,13 +58,13 @@ public interface IDhApiFogConfig extends IDhApiConfigGroup //====================// /** Defines at what distance fog is rendered on fake chunks. */ - IDhApiConfigValue distance(); + IDhApiConfigValue distance(); /** Should be used to enable/disable fog rendering. */ - IDhApiConfigValue drawMode(); + IDhApiConfigValue drawMode(); /** Can be used to enable support with mods that change vanilla MC's fog color. */ - IDhApiConfigValue color(); + IDhApiConfigValue color(); /** * If enabled attempts to disable vanilla MC's fog on real chunks.
diff --git a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiGpuBuffersConfig.java b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiGpuBuffersConfig.java index 56f6febc7..4b0433f7a 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiGpuBuffersConfig.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiGpuBuffersConfig.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.api.interfaces.config.client; -import com.seibel.distanthorizons.api.enums.config.EGpuUploadMethod; +import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; @@ -34,7 +34,7 @@ public interface IDhApiGpuBuffersConfig extends IDhApiConfigGroup { /** Defines how geometry data is uploaded to the GPU. */ - IDhApiConfigValue gpuUploadMethod(); + IDhApiConfigValue gpuUploadMethod(); /** * Defines how long we should wait after uploading one diff --git a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiGraphicsConfig.java b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiGraphicsConfig.java index eae828efc..eaf51d691 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiGraphicsConfig.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiGraphicsConfig.java @@ -20,9 +20,8 @@ package com.seibel.distanthorizons.api.interfaces.config.client; import com.seibel.distanthorizons.api.enums.config.*; -import com.seibel.distanthorizons.api.enums.config.*; -import com.seibel.distanthorizons.api.enums.rendering.ERendererMode; -import com.seibel.distanthorizons.api.enums.rendering.ETransparency; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiRendererMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiTransparency; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup; @@ -68,7 +67,7 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup * * Changing this config also changes {@link IDhApiGraphicsConfig#renderingEnabled()}'s value. */ - IDhApiConfigValue renderingMode(); + IDhApiConfigValue renderingMode(); @@ -77,18 +76,18 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup //==================// /** Defines how detailed fake chunks are in the horizontal direction */ - IDhApiConfigValue maxHorizontalResolution(); + IDhApiConfigValue maxHorizontalResolution(); /** Defines how detailed fake chunks are in the vertical direction */ - IDhApiConfigValue verticalQuality(); + IDhApiConfigValue verticalQuality(); /** Modifies the quadratic function fake chunks use for horizontal quality drop-off. */ - IDhApiConfigValue horizontalQuality(); + IDhApiConfigValue horizontalQuality(); - IDhApiConfigValue transparency(); + IDhApiConfigValue transparency(); /** Defines what blocks won't be rendered as LODs. */ - IDhApiConfigValue blocksToAvoid(); + IDhApiConfigValue blocksToAvoid(); /** * Defines if the color of avoided blocks will color the block below them.
@@ -112,17 +111,6 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup // advanced graphic settings // //===========================// - /** - * Sets the distance used by the near clip plane to reduce - * overdraw.
- * 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. - * - * @deprecated Use {@link IDhApiGraphicsConfig#overdrawPreventionRadius()} instead. - */ - @Deprecated - IDhApiConfigValue overdrawPrevention(); - /** * Sets the radius used by the near clip shader to reduce * overdraw.
@@ -172,7 +160,7 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup * * @since API 1.1.0 */ - IDhApiConfigValue lodShading(); + IDhApiConfigValue lodShading(); /** * Sets whether LODs outside the view frustum culling will diff --git a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiHeightFogConfig.java b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiHeightFogConfig.java index 4e1c98753..754cc01a9 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiHeightFogConfig.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiHeightFogConfig.java @@ -19,9 +19,9 @@ package com.seibel.distanthorizons.api.interfaces.config.client; -import com.seibel.distanthorizons.api.enums.rendering.EFogFalloff; -import com.seibel.distanthorizons.api.enums.rendering.EHeightFogMixMode; -import com.seibel.distanthorizons.api.enums.rendering.EHeightFogMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogFalloff; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiHeightFogMixMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiHeightFogMode; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; @@ -40,10 +40,10 @@ public interface IDhApiHeightFogConfig extends IDhApiConfigGroup { /** Defines how the height fog mixes. */ - IDhApiConfigValue heightFogMixMode(); + IDhApiConfigValue heightFogMixMode(); /** Defines how the height fog is drawn relative to the camera or world. */ - IDhApiConfigValue heightFogMode(); + IDhApiConfigValue heightFogMode(); /** * Defines the height fog's base height if {@link IDhApiHeightFogConfig#heightFogMode()} @@ -64,7 +64,7 @@ public interface IDhApiHeightFogConfig extends IDhApiConfigGroup IDhApiConfigValue heightFogMaxThickness(); /** Defines how the height fog changes in thickness. */ - IDhApiConfigValue heightFogFalloff(); + IDhApiConfigValue heightFogFalloff(); /** Defines the height fog's density. */ IDhApiConfigValue heightFogDensity(); diff --git a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiMultiplayerConfig.java b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiMultiplayerConfig.java index 39edf49a5..20397f392 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiMultiplayerConfig.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/config/client/IDhApiMultiplayerConfig.java @@ -20,7 +20,7 @@ package com.seibel.distanthorizons.api.interfaces.config.client; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; -import com.seibel.distanthorizons.api.enums.config.EServerFolderNameMode; +import com.seibel.distanthorizons.api.enums.config.EDhApiServerFolderNameMode; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup; /** @@ -37,7 +37,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 folderSavingMode(); + IDhApiConfigValue folderSavingMode(); /** * Defines the necessary similarity (as a percent) that two potential levels diff --git a/api/src/main/java/com/seibel/distanthorizons/coreapi/util/converters/RenderModeEnabledConverter.java b/api/src/main/java/com/seibel/distanthorizons/coreapi/util/converters/RenderModeEnabledConverter.java index 2bb47acfe..207d3c8b0 100644 --- a/api/src/main/java/com/seibel/distanthorizons/coreapi/util/converters/RenderModeEnabledConverter.java +++ b/api/src/main/java/com/seibel/distanthorizons/coreapi/util/converters/RenderModeEnabledConverter.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.coreapi.util.converters; -import com.seibel.distanthorizons.api.enums.rendering.ERendererMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiRendererMode; import com.seibel.distanthorizons.coreapi.interfaces.config.IConverter; /** @@ -28,17 +28,17 @@ import com.seibel.distanthorizons.coreapi.interfaces.config.IConverter; * @author James Seibel * @version 2022-6-30 */ -public class RenderModeEnabledConverter implements IConverter +public class RenderModeEnabledConverter implements IConverter { - @Override public ERendererMode convertToCoreType(Boolean renderingEnabled) + @Override public EDhApiRendererMode convertToCoreType(Boolean renderingEnabled) { - return renderingEnabled ? ERendererMode.DEFAULT : ERendererMode.DISABLED; + return renderingEnabled ? EDhApiRendererMode.DEFAULT : EDhApiRendererMode.DISABLED; } - @Override public Boolean convertToApiType(ERendererMode renderingMode) + @Override public Boolean convertToApiType(EDhApiRendererMode renderingMode) { - return renderingMode == ERendererMode.DEFAULT; + return renderingMode == EDhApiRendererMode.DEFAULT; } } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiDebuggingConfig.java b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiDebuggingConfig.java index e34b964b9..925dfc3da 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiDebuggingConfig.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiDebuggingConfig.java @@ -23,7 +23,7 @@ import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; import com.seibel.distanthorizons.api.interfaces.config.client.IDhApiDebuggingConfig; import com.seibel.distanthorizons.api.objects.config.DhApiConfigValue; import com.seibel.distanthorizons.core.config.Config; -import com.seibel.distanthorizons.api.enums.rendering.EDebugRendering; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiDebugRendering; public class DhApiDebuggingConfig implements IDhApiDebuggingConfig { @@ -33,8 +33,8 @@ public class DhApiDebuggingConfig implements IDhApiDebuggingConfig - public IDhApiConfigValue debugRendering() - { return new DhApiConfigValue(Config.Client.Advanced.Debugging.debugRendering); } + public IDhApiConfigValue debugRendering() + { return new DhApiConfigValue(Config.Client.Advanced.Debugging.debugRendering); } public IDhApiConfigValue debugKeybindings() { return new DhApiConfigValue(Config.Client.Advanced.Debugging.enableDebugKeybindings); } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiFarFogConfig.java b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiFarFogConfig.java index 1bacc727c..0393ccbdb 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiFarFogConfig.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiFarFogConfig.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.api.external.methods.config.client; -import com.seibel.distanthorizons.api.enums.rendering.EFogFalloff; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogFalloff; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; import com.seibel.distanthorizons.api.interfaces.config.client.IDhApiFarFogConfig; import com.seibel.distanthorizons.api.objects.config.DhApiConfigValue; @@ -50,8 +50,8 @@ public class DhApiFarFogConfig implements IDhApiFarFogConfig { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Fog.AdvancedFog.farFogMax); } @Override - public IDhApiConfigValue farFogFalloff() - { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Fog.AdvancedFog.farFogFalloff); } + public IDhApiConfigValue farFogFalloff() + { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Fog.AdvancedFog.farFogFalloff); } @Override public IDhApiConfigValue farFogDensity() diff --git a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiFogConfig.java b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiFogConfig.java index 9889723f2..61a2d3d92 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiFogConfig.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiFogConfig.java @@ -19,9 +19,9 @@ package com.seibel.distanthorizons.core.api.external.methods.config.client; -import com.seibel.distanthorizons.api.enums.rendering.EFogColorMode; -import com.seibel.distanthorizons.api.enums.rendering.EFogDistance; -import com.seibel.distanthorizons.api.enums.rendering.EFogDrawMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogColorMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogDistance; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogDrawMode; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; import com.seibel.distanthorizons.api.interfaces.config.client.IDhApiFarFogConfig; import com.seibel.distanthorizons.api.interfaces.config.client.IDhApiFogConfig; @@ -53,15 +53,15 @@ public class DhApiFogConfig implements IDhApiFogConfig //====================// @Override - public IDhApiConfigValue distance() + public IDhApiConfigValue distance() { return new DhApiConfigValue<>(Config.Client.Advanced.Graphics.Fog.distance); } @Override - public IDhApiConfigValue drawMode() + public IDhApiConfigValue drawMode() { return new DhApiConfigValue<>(Config.Client.Advanced.Graphics.Fog.drawMode); } @Override - public IDhApiConfigValue color() + public IDhApiConfigValue color() { return new DhApiConfigValue<>(Config.Client.Advanced.Graphics.Fog.colorMode); } @Override diff --git a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiGpuBuffersConfig.java b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiGpuBuffersConfig.java index 7069e5df4..22f4852b0 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiGpuBuffersConfig.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiGpuBuffersConfig.java @@ -23,7 +23,7 @@ import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; import com.seibel.distanthorizons.api.interfaces.config.client.IDhApiGpuBuffersConfig; import com.seibel.distanthorizons.api.objects.config.DhApiConfigValue; import com.seibel.distanthorizons.core.config.Config; -import com.seibel.distanthorizons.api.enums.config.EGpuUploadMethod; +import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod; public class DhApiGpuBuffersConfig implements IDhApiGpuBuffersConfig { @@ -33,7 +33,7 @@ public class DhApiGpuBuffersConfig implements IDhApiGpuBuffersConfig - public IDhApiConfigValue gpuUploadMethod() + public IDhApiConfigValue gpuUploadMethod() { return new DhApiConfigValue<>(Config.Client.Advanced.GpuBuffers.gpuUploadMethod); } public IDhApiConfigValue gpuUploadPerMegabyteInMilliseconds() diff --git a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiGraphicsConfig.java b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiGraphicsConfig.java index 63b810521..27c1d48eb 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiGraphicsConfig.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiGraphicsConfig.java @@ -20,14 +20,14 @@ package com.seibel.distanthorizons.core.api.external.methods.config.client; import com.seibel.distanthorizons.api.enums.config.*; -import com.seibel.distanthorizons.api.enums.rendering.ETransparency; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiTransparency; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; import com.seibel.distanthorizons.api.interfaces.config.client.IDhApiAmbientOcclusionConfig; import com.seibel.distanthorizons.api.interfaces.config.client.IDhApiFogConfig; import com.seibel.distanthorizons.api.interfaces.config.client.IDhApiGraphicsConfig; import com.seibel.distanthorizons.api.interfaces.config.client.IDhApiNoiseTextureConfig; import com.seibel.distanthorizons.api.objects.config.DhApiConfigValue; -import com.seibel.distanthorizons.api.enums.rendering.ERendererMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiRendererMode; import com.seibel.distanthorizons.core.config.Config; public class DhApiGraphicsConfig implements IDhApiGraphicsConfig @@ -61,8 +61,8 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig { return new DhApiConfigValue(Config.Client.quickEnableRendering); } @Override - public IDhApiConfigValue renderingMode() - { return new DhApiConfigValue(Config.Client.Advanced.Debugging.rendererMode); } + public IDhApiConfigValue renderingMode() + { return new DhApiConfigValue(Config.Client.Advanced.Debugging.rendererMode); } @@ -71,24 +71,24 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig //==================// @Override - public IDhApiConfigValue maxHorizontalResolution() - { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Quality.maxHorizontalResolution); } + public IDhApiConfigValue maxHorizontalResolution() + { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Quality.maxHorizontalResolution); } @Override - public IDhApiConfigValue verticalQuality() - { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Quality.verticalQuality); } + public IDhApiConfigValue verticalQuality() + { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Quality.verticalQuality); } @Override - public IDhApiConfigValue horizontalQuality() - { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Quality.horizontalQuality); } + public IDhApiConfigValue horizontalQuality() + { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Quality.horizontalQuality); } @Override - public IDhApiConfigValue transparency() - { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Quality.transparency); } + public IDhApiConfigValue transparency() + { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Quality.transparency); } @Override - public IDhApiConfigValue blocksToAvoid() - { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Quality.blocksToIgnore); } + public IDhApiConfigValue blocksToAvoid() + { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Quality.blocksToIgnore); } @Override public IDhApiConfigValue tintWithAvoidedBlocks() @@ -105,11 +105,6 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig // advanced graphic settings // //===========================// - @Deprecated - @Override - public IDhApiConfigValue overdrawPrevention() - { return new DhApiConfigValue(Config.Client.Advanced.Graphics.AdvancedGraphics.overdrawPreventionPreset); } - @Override public IDhApiConfigValue overdrawPreventionRadius() { return new DhApiConfigValue(Config.Client.Advanced.Graphics.AdvancedGraphics.overdrawPrevention); } @@ -143,8 +138,8 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig { return new DhApiConfigValue(Config.Client.Advanced.Graphics.AdvancedGraphics.lodBias); } @Override - public IDhApiConfigValue lodShading() - { return new DhApiConfigValue(Config.Client.Advanced.Graphics.AdvancedGraphics.lodShading); } + public IDhApiConfigValue lodShading() + { return new DhApiConfigValue(Config.Client.Advanced.Graphics.AdvancedGraphics.lodShading); } @Override public IDhApiConfigValue disableFrustumCulling() diff --git a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiHeightFogConfig.java b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiHeightFogConfig.java index 866137bc0..ecd1090a2 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiHeightFogConfig.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiHeightFogConfig.java @@ -19,9 +19,9 @@ package com.seibel.distanthorizons.core.api.external.methods.config.client; -import com.seibel.distanthorizons.api.enums.rendering.EFogFalloff; -import com.seibel.distanthorizons.api.enums.rendering.EHeightFogMixMode; -import com.seibel.distanthorizons.api.enums.rendering.EHeightFogMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogFalloff; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiHeightFogMixMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiHeightFogMode; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; import com.seibel.distanthorizons.api.interfaces.config.client.IDhApiHeightFogConfig; import com.seibel.distanthorizons.api.objects.config.DhApiConfigValue; @@ -36,12 +36,12 @@ public class DhApiHeightFogConfig implements IDhApiHeightFogConfig @Override - public IDhApiConfigValue heightFogMixMode() - { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogMixMode); } + public IDhApiConfigValue heightFogMixMode() + { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogMixMode); } @Override - public IDhApiConfigValue heightFogMode() - { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogMode); } + public IDhApiConfigValue heightFogMode() + { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogMode); } @Override public IDhApiConfigValue heightFogBaseHeight() @@ -64,8 +64,8 @@ public class DhApiHeightFogConfig implements IDhApiHeightFogConfig { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogMax); } @Override - public IDhApiConfigValue heightFogFalloff() - { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogFalloff); } + public IDhApiConfigValue heightFogFalloff() + { return new DhApiConfigValue(Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogFalloff); } @Override public IDhApiConfigValue heightFogDensity() diff --git a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiMultiplayerConfig.java b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiMultiplayerConfig.java index e09d70244..1c16671d0 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiMultiplayerConfig.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/client/DhApiMultiplayerConfig.java @@ -23,7 +23,7 @@ import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; import com.seibel.distanthorizons.api.interfaces.config.client.IDhApiMultiplayerConfig; import com.seibel.distanthorizons.api.objects.config.DhApiConfigValue; import com.seibel.distanthorizons.core.config.Config; -import com.seibel.distanthorizons.api.enums.config.EServerFolderNameMode; +import com.seibel.distanthorizons.api.enums.config.EDhApiServerFolderNameMode; public class DhApiMultiplayerConfig implements IDhApiMultiplayerConfig { @@ -33,8 +33,8 @@ public class DhApiMultiplayerConfig implements IDhApiMultiplayerConfig - public IDhApiConfigValue folderSavingMode() - { return new DhApiConfigValue(Config.Client.Advanced.Multiplayer.serverFolderNameMode); } + public IDhApiConfigValue folderSavingMode() + { return new DhApiConfigValue(Config.Client.Advanced.Multiplayer.serverFolderNameMode); } public IDhApiConfigValue multiverseSimilarityRequirement() { return new DhApiConfigValue(Config.Client.Advanced.Multiplayer.multiverseSimilarityRequiredPercent); } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/common/DhApiWorldGenerationConfig.java b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/common/DhApiWorldGenerationConfig.java index 121909395..547f395b1 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/common/DhApiWorldGenerationConfig.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/config/common/DhApiWorldGenerationConfig.java @@ -19,7 +19,6 @@ package com.seibel.distanthorizons.core.api.external.methods.config.common; -import com.seibel.distanthorizons.api.enums.config.ELightGenerationMode; import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue; import com.seibel.distanthorizons.api.interfaces.config.both.IDhApiWorldGenerationConfig; import com.seibel.distanthorizons.api.objects.config.DhApiConfigValue; diff --git a/core/src/main/java/com/seibel/distanthorizons/core/api/internal/ClientApi.java b/core/src/main/java/com/seibel/distanthorizons/core/api/internal/ClientApi.java index b4d0b3f04..48b1bf012 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/api/internal/ClientApi.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/api/internal/ClientApi.java @@ -21,7 +21,6 @@ package com.seibel.distanthorizons.core.api.internal; import com.seibel.distanthorizons.api.DhApi; import com.seibel.distanthorizons.api.enums.rendering.EDhApiRenderPass; -import com.seibel.distanthorizons.api.interfaces.override.rendering.IDhApiFramebuffer; import com.seibel.distanthorizons.api.methods.events.abstractEvents.*; import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiRenderParam; import com.seibel.distanthorizons.core.level.IKeyedClientLevelManager; @@ -32,10 +31,9 @@ import com.seibel.distanthorizons.core.world.*; import com.seibel.distanthorizons.coreapi.DependencyInjection.ApiEventInjector; import com.seibel.distanthorizons.core.level.IDhClientLevel; import com.seibel.distanthorizons.core.config.Config; -import com.seibel.distanthorizons.coreapi.DependencyInjection.OverrideInjector; import com.seibel.distanthorizons.coreapi.ModInfo; -import com.seibel.distanthorizons.api.enums.rendering.EDebugRendering; -import com.seibel.distanthorizons.api.enums.rendering.ERendererMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiDebugRendering; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiRendererMode; import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector; import com.seibel.distanthorizons.core.logging.ConfigBasedLogger; import com.seibel.distanthorizons.core.logging.ConfigBasedSpamLogger; @@ -54,7 +52,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.Nullable; import org.lwjgl.glfw.GLFW; -import org.lwjgl.opengl.GL32; import java.util.HashMap; import java.util.HashSet; @@ -547,7 +544,7 @@ public class ClientApi if (!renderingDeferredLayer) { - if (Config.Client.Advanced.Debugging.rendererMode.get() == ERendererMode.DEFAULT) + if (Config.Client.Advanced.Debugging.rendererMode.get() == EDhApiRendererMode.DEFAULT) { this.renderingCancelledForThisFrame = ApiEventInjector.INSTANCE.fireAllEvents(DhApiBeforeRenderEvent.class, renderEventParam); if (!this.renderingCancelledForThisFrame) @@ -560,7 +557,7 @@ public class ClientApi ApiEventInjector.INSTANCE.fireAllEvents(DhApiAfterRenderEvent.class, renderEventParam); } } - else if (Config.Client.Advanced.Debugging.rendererMode.get() == ERendererMode.DEBUG) + else if (Config.Client.Advanced.Debugging.rendererMode.get() == EDhApiRendererMode.DEBUG) { profiler.push("Render Debug"); ClientApi.testRenderer.render(); @@ -617,12 +614,12 @@ public class ClientApi if (glfwKey == GLFW.GLFW_KEY_F8) { - Config.Client.Advanced.Debugging.debugRendering.set(EDebugRendering.next(Config.Client.Advanced.Debugging.debugRendering.get())); + Config.Client.Advanced.Debugging.debugRendering.set(EDhApiDebugRendering.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) { - Config.Client.Advanced.Debugging.rendererMode.set(ERendererMode.next(Config.Client.Advanced.Debugging.rendererMode.get())); + Config.Client.Advanced.Debugging.rendererMode.set(EDhApiRendererMode.next(Config.Client.Advanced.Debugging.rendererMode.get())); MC.sendChatMessage("F6: Set rendering to " + Config.Client.Advanced.Debugging.rendererMode.get()); } else if (glfwKey == GLFW.GLFW_KEY_P) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java b/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java index 1594afe79..2cf5dd26f 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java @@ -74,8 +74,8 @@ public class Config public static ConfigLinkedEntry quickLodChunkRenderDistance = new ConfigLinkedEntry(Advanced.Graphics.Quality.lodChunkRenderDistanceRadius); - public static ConfigEntry qualityPresetSetting = new ConfigEntry.Builder() - .set(EQualityPreset.MEDIUM) // the default value is set via the listener when accessed + public static ConfigEntry qualityPresetSetting = new ConfigEntry.Builder() + .set(EDhApiQualityPreset.MEDIUM) // the default value is set via the listener when accessed .comment("" + "Changing this setting will modify a number of different settings that will change the \n" + "visual fidelity of the rendered LODs.\n" @@ -86,8 +86,8 @@ public class Config .addListener(RenderQualityPresetConfigEventHandler.INSTANCE) .build(); - public static ConfigEntry threadPresetSetting = new ConfigEntry.Builder() - .set(EThreadPreset.LOW_IMPACT) // the default value is set via the listener when accessed + public static ConfigEntry threadPresetSetting = new ConfigEntry.Builder() + .set(EDhApiThreadPreset.LOW_IMPACT) // the default value is set via the listener when accessed .comment("" + "Changing this setting will modify a number of different settings that will change \n" + "the load that Distant Horizons is allowed to put on your CPU. \n" @@ -140,20 +140,20 @@ public class Config public static class Quality { - public static ConfigEntry maxHorizontalResolution = new ConfigEntry.Builder() - .set(EMaxHorizontalResolution.BLOCK) + public static ConfigEntry maxHorizontalResolution = new ConfigEntry.Builder() + .set(EDhApiMaxHorizontalResolution.BLOCK) .comment("" + "What is the maximum detail LODs should be drawn at? \n" + "Higher settings will increase memory and GPU usage. \n" + "\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" + + EDhApiMaxHorizontalResolution.CHUNK + ": render 1 LOD for each Chunk. \n" + + EDhApiMaxHorizontalResolution.HALF_CHUNK + ": render 4 LODs for each Chunk. \n" + + EDhApiMaxHorizontalResolution.FOUR_BLOCKS + ": render 16 LODs for each Chunk. \n" + + EDhApiMaxHorizontalResolution.TWO_BLOCKS + ": render 64 LODs for each Chunk. \n" + + EDhApiMaxHorizontalResolution.BLOCK + ": render 256 LODs for each Chunk (width of one block). \n" + "\n" - + "Lowest Quality: " + EMaxHorizontalResolution.CHUNK + "\n" - + "Highest Quality: " + EMaxHorizontalResolution.BLOCK) + + "Lowest Quality: " + EDhApiMaxHorizontalResolution.CHUNK + "\n" + + "Highest Quality: " + EDhApiMaxHorizontalResolution.BLOCK) .setPerformance(EConfigEntryPerformance.MEDIUM) .build(); @@ -163,21 +163,21 @@ public class Config .setPerformance(EConfigEntryPerformance.HIGH) .build(); - public static ConfigEntry verticalQuality = new ConfigEntry.Builder() - .set(EVerticalQuality.MEDIUM) + public static ConfigEntry verticalQuality = new ConfigEntry.Builder() + .set(EDhApiVerticalQuality.MEDIUM) .comment("" + "This indicates how well LODs will represent \n" + "overhangs, caves, floating islands, etc. \n" + "Higher options will make the world more accurate, but" + "will increase memory and GPU usage. \n" + "\n" - + "Lowest Quality: " + EVerticalQuality.HEIGHT_MAP + "\n" - + "Highest Quality: " + EVerticalQuality.EXTREME) + + "Lowest Quality: " + EDhApiVerticalQuality.HEIGHT_MAP + "\n" + + "Highest Quality: " + EDhApiVerticalQuality.EXTREME) .setPerformance(EConfigEntryPerformance.VERY_HIGH) .build(); - public static ConfigEntry horizontalQuality = new ConfigEntry.Builder() - .set(EHorizontalQuality.MEDIUM) + public static ConfigEntry horizontalQuality = new ConfigEntry.Builder() + .set(EDhApiHorizontalQuality.MEDIUM) .comment("" + "This indicates how quickly LODs decrease in quality the further away they are. \n" + "Higher settings will render higher quality fake chunks farther away, \n" @@ -185,25 +185,25 @@ public class Config .setPerformance(EConfigEntryPerformance.MEDIUM) .build(); - public static ConfigEntry transparency = new ConfigEntry.Builder() - .set(ETransparency.COMPLETE) + public static ConfigEntry transparency = new ConfigEntry.Builder() + .set(EDhApiTransparency.COMPLETE) .comment("" + "How should LOD transparency be handled. \n" + "\n" - + ETransparency.COMPLETE + ": LODs will render transparent. \n" - + ETransparency.FAKE + ": LODs will be opaque, but shaded to match the blocks underneath. \n" - + ETransparency.DISABLED + ": LODs will be opaque. \n" + + EDhApiTransparency.COMPLETE + ": LODs will render transparent. \n" + + EDhApiTransparency.FAKE + ": LODs will be opaque, but shaded to match the blocks underneath. \n" + + EDhApiTransparency.DISABLED + ": LODs will be opaque. \n" + "") .setPerformance(EConfigEntryPerformance.MEDIUM) .build(); - public static ConfigEntry blocksToIgnore = new ConfigEntry.Builder() - .set(EBlocksToAvoid.NON_COLLIDING) + public static ConfigEntry blocksToIgnore = new ConfigEntry.Builder() + .set(EDhApiBlocksToAvoid.NON_COLLIDING) .comment("" + "What blocks shouldn't be rendered as LODs? \n" + "\n" - + EBlocksToAvoid.NONE + ": Represent all blocks in the LODs \n" - + EBlocksToAvoid.NON_COLLIDING + ": Only represent solid blocks in the LODs (tall grass, torches, etc. won't count for a LOD's height) \n" + + EDhApiBlocksToAvoid.NONE + ": Represent all blocks in the LODs \n" + + EDhApiBlocksToAvoid.NON_COLLIDING + ": Only represent solid blocks in the LODs (tall grass, torches, etc. won't count for a LOD's height) \n" + "") .setPerformance(EConfigEntryPerformance.NONE) .build(); @@ -236,33 +236,33 @@ public class Config public static class Fog { - public static ConfigEntry drawMode = new ConfigEntry.Builder() - .set(EFogDrawMode.FOG_ENABLED) + public static ConfigEntry drawMode = new ConfigEntry.Builder() + .set(EDhApiFogDrawMode.FOG_ENABLED) .comment("" + "When should fog be drawn? \n" + "\n" - + EFogDrawMode.USE_OPTIFINE_SETTING + ": Use whatever Fog setting Optifine is using.\n" - + "If Optifine isn't installed this defaults to " + EFogDrawMode.FOG_ENABLED + ". \n" - + EFogDrawMode.FOG_ENABLED + ": Never draw fog on the LODs \n" - + EFogDrawMode.FOG_DISABLED + ": Always draw fast fog on the LODs \n" + + EDhApiFogDrawMode.USE_OPTIFINE_SETTING + ": Use whatever Fog setting Optifine is using.\n" + + "If Optifine isn't installed this defaults to " + EDhApiFogDrawMode.FOG_ENABLED + ". \n" + + EDhApiFogDrawMode.FOG_ENABLED + ": Never draw fog on the LODs \n" + + EDhApiFogDrawMode.FOG_DISABLED + ": Always draw fast fog on the LODs \n" + "\n" + "Disabling fog will improve GPU performance.") .setPerformance(EConfigEntryPerformance.VERY_LOW) .build(); - public static ConfigEntry distance = new ConfigEntry.Builder() - .set(EFogDistance.FAR) + public static ConfigEntry distance = new ConfigEntry.Builder() + .set(EDhApiFogDistance.FAR) .comment("At what distance should Fog be drawn on the LODs?") .setPerformance(EConfigEntryPerformance.NONE) .build(); - public static ConfigEntry colorMode = new ConfigEntry.Builder() - .set(EFogColorMode.USE_WORLD_FOG_COLOR) + public static ConfigEntry colorMode = new ConfigEntry.Builder() + .set(EDhApiFogColorMode.USE_WORLD_FOG_COLOR) .comment("" + "What color should fog use? \n" + "\n" - + EFogColorMode.USE_WORLD_FOG_COLOR + ": Use the world's fog color. \n" - + EFogColorMode.USE_SKY_COLOR + ": Use the sky's color.") + + EDhApiFogColorMode.USE_WORLD_FOG_COLOR + ": Use the world's fog color. \n" + + EDhApiFogColorMode.USE_SKY_COLOR + ": Use the sky's color.") .setPerformance(EConfigEntryPerformance.NONE) .build(); @@ -322,14 +322,14 @@ public class Config + "1.0: Fully opaque fog.") .build(); - public static ConfigEntry farFogFalloff = new ConfigEntry.Builder() - .set(EFogFalloff.EXPONENTIAL_SQUARED) + public static ConfigEntry farFogFalloff = new ConfigEntry.Builder() + .set(EDhApiFogFalloff.EXPONENTIAL_SQUARED) .comment("" + "How should the fog thickness should be calculated? \n" + "\n" - + EFogFalloff.LINEAR + ": Linear based on distance (will ignore 'density')\n" - + EFogFalloff.EXPONENTIAL + ": 1/(e^(distance*density)) \n" - + EFogFalloff.EXPONENTIAL_SQUARED + ": 1/(e^((distance*density)^2)") + + EDhApiFogFalloff.LINEAR + ": Linear based on distance (will ignore 'density')\n" + + EDhApiFogFalloff.EXPONENTIAL + ": 1/(e^(distance*density)) \n" + + EDhApiFogFalloff.EXPONENTIAL_SQUARED + ": 1/(e^((distance*density)^2)") .build(); public static ConfigEntry farFogDensity = new ConfigEntry.Builder() @@ -345,37 +345,37 @@ public class Config public static class HeightFog { - public static ConfigEntry heightFogMixMode = new ConfigEntry.Builder() - .set(EHeightFogMixMode.BASIC) + public static ConfigEntry heightFogMixMode = new ConfigEntry.Builder() + .set(EDhApiHeightFogMixMode.BASIC) .comment("" + "How should height effect the fog thickness? \n" + "Note: height fog is combined with the other fog settings. \n" + "\n" - + EHeightFogMixMode.BASIC + ": No special height fog effect. Fog is calculated based on camera distance \n" - + EHeightFogMixMode.IGNORE_HEIGHT + ": Ignore height completely. Fog is only calculated with horizontal distance \n" - + EHeightFogMixMode.ADDITION + ": heightFog + farFog \n" - + EHeightFogMixMode.MAX + ": max(heightFog, farFog) \n" - + EHeightFogMixMode.MULTIPLY + ": heightFog * farFog \n" - + EHeightFogMixMode.INVERSE_MULTIPLY + ": 1 - (1-heightFog) * (1-farFog) \n" - + EHeightFogMixMode.LIMITED_ADDITION + ": farFog + max(farFog, heightFog) \n" - + EHeightFogMixMode.MULTIPLY_ADDITION + ": farFog + farFog * heightFog \n" - + EHeightFogMixMode.INVERSE_MULTIPLY_ADDITION + ": farFog + 1 - (1-heightFog) * (1-farFog) \n" - + EHeightFogMixMode.AVERAGE + ": farFog*0.5 + heightFog*0.5 \n" + + EDhApiHeightFogMixMode.BASIC + ": No special height fog effect. Fog is calculated based on camera distance \n" + + EDhApiHeightFogMixMode.IGNORE_HEIGHT + ": Ignore height completely. Fog is only calculated with horizontal distance \n" + + EDhApiHeightFogMixMode.ADDITION + ": heightFog + farFog \n" + + EDhApiHeightFogMixMode.MAX + ": max(heightFog, farFog) \n" + + EDhApiHeightFogMixMode.MULTIPLY + ": heightFog * farFog \n" + + EDhApiHeightFogMixMode.INVERSE_MULTIPLY + ": 1 - (1-heightFog) * (1-farFog) \n" + + EDhApiHeightFogMixMode.LIMITED_ADDITION + ": farFog + max(farFog, heightFog) \n" + + EDhApiHeightFogMixMode.MULTIPLY_ADDITION + ": farFog + farFog * heightFog \n" + + EDhApiHeightFogMixMode.INVERSE_MULTIPLY_ADDITION + ": farFog + 1 - (1-heightFog) * (1-farFog) \n" + + EDhApiHeightFogMixMode.AVERAGE + ": farFog*0.5 + heightFog*0.5 \n" + "\n" - + "Note: height fog settings are ignored if '" + EHeightFogMixMode.BASIC + "' or '" + EHeightFogMixMode.IGNORE_HEIGHT + "' are selected.") + + "Note: height fog settings are ignored if '" + EDhApiHeightFogMixMode.BASIC + "' or '" + EDhApiHeightFogMixMode.IGNORE_HEIGHT + "' are selected.") .build(); - public static ConfigEntry heightFogMode = new ConfigEntry.Builder() - .set(EHeightFogMode.ABOVE_AND_BELOW_CAMERA) + public static ConfigEntry heightFogMode = new ConfigEntry.Builder() + .set(EDhApiHeightFogMode.ABOVE_AND_BELOW_CAMERA) .comment("" + "Where should the height fog start? \n" + "\n" - + EHeightFogMode.ABOVE_CAMERA + ": Height fog starts at the camera and goes towards the sky \n" - + EHeightFogMode.BELOW_CAMERA + ": Height fog starts at the camera and goes towards the void \n" - + EHeightFogMode.ABOVE_AND_BELOW_CAMERA + ": Height fog starts from the camera to goes towards both the sky and void \n" - + EHeightFogMode.ABOVE_SET_HEIGHT + ": Height fog starts from a set height and goes towards the sky \n" - + EHeightFogMode.BELOW_SET_HEIGHT + ": Height fog starts from a set height and goes towards the void \n" - + EHeightFogMode.ABOVE_AND_BELOW_SET_HEIGHT + ": Height fog starts from a set height and goes towards both the sky and void") + + EDhApiHeightFogMode.ABOVE_CAMERA + ": Height fog starts at the camera and goes towards the sky \n" + + EDhApiHeightFogMode.BELOW_CAMERA + ": Height fog starts at the camera and goes towards the void \n" + + EDhApiHeightFogMode.ABOVE_AND_BELOW_CAMERA + ": Height fog starts from the camera to goes towards both the sky and void \n" + + EDhApiHeightFogMode.ABOVE_SET_HEIGHT + ": Height fog starts from a set height and goes towards the sky \n" + + EDhApiHeightFogMode.BELOW_SET_HEIGHT + ": Height fog starts from a set height and goes towards the void \n" + + EDhApiHeightFogMode.ABOVE_AND_BELOW_SET_HEIGHT + ": Height fog starts from a set height and goes towards both the sky and void") .build(); public static ConfigEntry heightFogBaseHeight = new ConfigEntry.Builder() @@ -419,14 +419,14 @@ public class Config + "1.0: Fully opaque fog.") .build(); - public static ConfigEntry heightFogFalloff = new ConfigEntry.Builder() - .set(EFogFalloff.EXPONENTIAL_SQUARED) + public static ConfigEntry heightFogFalloff = new ConfigEntry.Builder() + .set(EDhApiFogFalloff.EXPONENTIAL_SQUARED) .comment("" + "How should the height fog thickness should be calculated? \n" + "\n" - + EFogFalloff.LINEAR + ": Linear based on height (will ignore 'density')\n" - + EFogFalloff.EXPONENTIAL + ": 1/(e^(height*density)) \n" - + EFogFalloff.EXPONENTIAL_SQUARED + ": 1/(e^((height*density)^2)") + + EDhApiFogFalloff.LINEAR + ": Linear based on height (will ignore 'density')\n" + + EDhApiFogFalloff.EXPONENTIAL + ": 1/(e^(height*density)) \n" + + EDhApiFogFalloff.EXPONENTIAL_SQUARED + ": 1/(e^((height*density)^2)") .build(); public static ConfigEntry heightFogDensity = new ConfigEntry.Builder() @@ -536,18 +536,6 @@ public class Config public static class AdvancedGraphics { - /** - * @deprecated Use overdrawPrevention instead, will be removed when DH updates to MC 1.21
- * After removal a float value will be used to control overdraw instead.
- */ - @Deprecated - public static ConfigEntry overdrawPreventionPreset = new ConfigEntry.Builder() - .set(EOverdrawPrevention.MEDIUM) - .comment("") - .setAppearance(EConfigEntryAppearance.ONLY_IN_API) - .setPerformance(EConfigEntryPerformance.NONE) - .build(); - public static ConfigEntry overdrawPrevention = new ConfigEntry.Builder() .setMinDefaultMax(0.0, 0.4, 1.0) .comment("" @@ -628,15 +616,15 @@ public class Config + "If set to 0 the mod wont overwrite vanilla's default (which so happens to also be 0)") .build(); - public static ConfigEntry lodShading = new ConfigEntry.Builder() - .set(ELodShading.AUTO) + public static ConfigEntry lodShading = new ConfigEntry.Builder() + .set(EDhApiLodShading.AUTO) .comment("" + "How should LODs be shaded? \n" + "\n" - + ELodShading.AUTO + ": Uses the same side shading as vanilla Minecraft blocks. \n" - + ELodShading.FORCED + ": Simulates Minecraft's block shading for LODs. \n" + + EDhApiLodShading.AUTO + ": Uses the same side shading as vanilla Minecraft blocks. \n" + + EDhApiLodShading.ENABLED + ": Simulates Minecraft's block shading for LODs. \n" + " Can be used to force LOD shading when using some shaders. \n" - + ELodShading.NONE + ": All LOD sides will be rendered with the same brightness. \n" + + EDhApiLodShading.DISABLED + ": All LOD sides will be rendered with the same brightness. \n" + "") .setPerformance(EConfigEntryPerformance.NONE) .build(); @@ -730,36 +718,6 @@ public class Config + "") .build(); - // deprecated and not implemented, can be made public if we ever re-implement it - @Deprecated - private static ConfigEntry generationPriority = new ConfigEntry.Builder() - .set(EGenerationPriority.NEAR_FIRST) - .comment("" - + "In what priority should fake chunks be generated outside the vanilla render distance? \n" - + "\n" - + EGenerationPriority.FAR_FIRST + " \n" - + "Fake chunks are generated from lowest to highest detail \n" - + " with a priority for far away regions. \n" - + "This fills in the world fastest, but you will have large low detail \n" - + " blocks for a while while the generation happens. \n" - + "\n" - + EGenerationPriority.NEAR_FIRST + " \n" - + "Fake chunks are generated around the player \n" - + " in a spiral, similar to vanilla minecraft. \n" - + "Best used when on a server since we can't generate \n" - + " fake chunks. \n" - + "\n" - + EGenerationPriority.BALANCED + " \n" - + "A mix between " + EGenerationPriority.NEAR_FIRST + "and" + EGenerationPriority.FAR_FIRST + ". \n" - + "First prioritise completing nearby highest detail chunks, \n" - + " then focus on filling in the low detail areas away from the player. \n" - + "\n" - + EGenerationPriority.AUTO + " \n" - + "Uses " + EGenerationPriority.BALANCED + " when on a single player world \n" - + " and " + EGenerationPriority.NEAR_FIRST + " when connected to a server.") - .setPerformance(EConfigEntryPerformance.NONE) - .build(); - } public static class LodBuilding @@ -846,16 +804,16 @@ public class Config public static class Multiplayer { - public static ConfigEntry serverFolderNameMode = new ConfigEntry.Builder() - .set(EServerFolderNameMode.NAME_ONLY) + public static ConfigEntry serverFolderNameMode = new ConfigEntry.Builder() + .set(EDhApiServerFolderNameMode.NAME_ONLY) .comment("" + "How should multiplayer save folders should be named? \n" + "\n" - + EServerFolderNameMode.NAME_ONLY + ": Example: \"Minecraft Server\" \n" - + EServerFolderNameMode.IP_ONLY + ": Example: \"192.168.1.40\" \n" - + EServerFolderNameMode.NAME_IP + ": Example: \"Minecraft Server IP 192.168.1.40\" \n" - + EServerFolderNameMode.NAME_IP_PORT + ": Example: \"Minecraft Server IP 192.168.1.40:25565\"" - + EServerFolderNameMode.NAME_IP_PORT_MC_VERSION + ": Example: \"Minecraft Server IP 192.168.1.40:25565 GameVersion 1.16.5\"") + + EDhApiServerFolderNameMode.NAME_ONLY + ": Example: \"Minecraft Server\" \n" + + EDhApiServerFolderNameMode.IP_ONLY + ": Example: \"192.168.1.40\" \n" + + EDhApiServerFolderNameMode.NAME_IP + ": Example: \"Minecraft Server IP 192.168.1.40\" \n" + + EDhApiServerFolderNameMode.NAME_IP_PORT + ": Example: \"Minecraft Server IP 192.168.1.40:25565\"" + + EDhApiServerFolderNameMode.NAME_IP_PORT_MC_VERSION + ": Example: \"Minecraft Server IP 192.168.1.40:25565 GameVersion 1.16.5\"") .build(); public static ConfigEntry multiverseSimilarityRequiredPercent = new ConfigEntry.Builder() @@ -1017,27 +975,27 @@ public class Config public static class GpuBuffers { - public static ConfigEntry gpuUploadMethod = new ConfigEntry.Builder() - .set(EGpuUploadMethod.AUTO) + public static ConfigEntry gpuUploadMethod = new ConfigEntry.Builder() + .set(EDhApiGpuUploadMethod.AUTO) .comment("" + "What method should be used to upload geometry to the GPU? \n" + "\n" - + EGpuUploadMethod.AUTO + ": Picks the best option based on the GPU you have. \n" + + EDhApiGpuUploadMethod.AUTO + ": Picks the best option based on the GPU you have. \n" + "\n" - + EGpuUploadMethod.BUFFER_STORAGE + ": Default if OpenGL 4.5 is supported. \n" + + EDhApiGpuUploadMethod.BUFFER_STORAGE + ": Default if OpenGL 4.5 is supported. \n" + " Fast rendering, no stuttering. \n" + "\n" - + EGpuUploadMethod.SUB_DATA + ": Backup option for NVIDIA. \n" + + EDhApiGpuUploadMethod.SUB_DATA + ": Backup option for NVIDIA. \n" + " Fast rendering but may stutter when uploading. \n" + "\n" - + EGpuUploadMethod.BUFFER_MAPPING + ": Slow rendering but won't stutter when uploading. \n" + + EDhApiGpuUploadMethod.BUFFER_MAPPING + ": Slow rendering but won't stutter when uploading. \n" + " Generally the best option for integrated GPUs. \n" + " Default option for AMD/Intel if OpenGL 4.5 isn't supported. \n" + " May end up storing buffers in System memory. \n" + " Fast rendering if in GPU memory, slow if in system memory, \n" + " but won't stutter when uploading. \n" + "\n" - + EGpuUploadMethod.DATA + ": Fast rendering but will stutter when uploading. \n" + + EDhApiGpuUploadMethod.DATA + ": Fast rendering but will stutter when uploading. \n" + " Backup option for AMD/Intel. \n" + " Fast rendering but may stutter when uploading. \n" + "\n" @@ -1070,15 +1028,6 @@ public class Config + "") .build(); - // deprecated and not implemented, can be made public if we ever re-implement it - @Deprecated - private static ConfigEntry rebuildTimes = new ConfigEntry.Builder() - .set(EBufferRebuildTimes.NORMAL) - .comment("" - + "How frequently should vertex buffers (geometry) be rebuilt and sent to the GPU? \n" - + "Higher settings may cause stuttering, but will prevent holes in the world") - .build(); - } public static class AutoUpdater @@ -1097,9 +1046,9 @@ public class Config + "Should Distant Horizons silently, automatically download and install new versions?") .build(); - public static ConfigEntry updateBranch = new ConfigEntry.Builder() + public static ConfigEntry updateBranch = new ConfigEntry.Builder() .set( - ModInfo.IS_DEV_BUILD? EUpdateBranch.NIGHTLY: EUpdateBranch.STABLE // If it's already a nightly build, then download the nightly build ofc + ModInfo.IS_DEV_BUILD? EDhApiUpdateBranch.NIGHTLY: EDhApiUpdateBranch.STABLE // If it's already a nightly build, then download the nightly build ofc ) .comment("" + " If DH should use the nightly (provided by Gitlab), or stable (provided by Modrinth) build") @@ -1110,64 +1059,64 @@ public class Config { // TODO add change all option // TODO default to error chat and info file - public static ConfigEntry logWorldGenEvent = new ConfigEntry.Builder() - .set(ELoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE) + public static ConfigEntry logWorldGenEvent = new ConfigEntry.Builder() + .set(EDhApiLoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE) .comment("" + "If enabled, the mod will log information about the world generation process. \n" + "This can be useful for debugging.") .build(); - public static ConfigEntry logWorldGenPerformance = new ConfigEntry.Builder() - .set(ELoggerMode.LOG_WARNING_TO_CHAT_AND_FILE) + public static ConfigEntry logWorldGenPerformance = new ConfigEntry.Builder() + .set(EDhApiLoggerMode.LOG_WARNING_TO_CHAT_AND_FILE) .comment("" + "If enabled, the mod will log performance about the world generation process. \n" + "This can be useful for debugging.") .build(); - public static ConfigEntry logWorldGenLoadEvent = new ConfigEntry.Builder() - .set(ELoggerMode.LOG_WARNING_TO_CHAT_AND_FILE) + public static ConfigEntry logWorldGenLoadEvent = new ConfigEntry.Builder() + .set(EDhApiLoggerMode.LOG_WARNING_TO_CHAT_AND_FILE) .comment("" + "If enabled, the mod will log information about the world generation process. \n" + "This can be useful for debugging.") .build(); - public static ConfigEntry logLodBuilderEvent = new ConfigEntry.Builder() - .set(ELoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE) + public static ConfigEntry logLodBuilderEvent = new ConfigEntry.Builder() + .set(EDhApiLoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE) .comment("" + "If enabled, the mod will log information about the LOD generation process. \n" + "This can be useful for debugging.") .build(); - public static ConfigEntry logRendererBufferEvent = new ConfigEntry.Builder() - .set(ELoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE) + public static ConfigEntry logRendererBufferEvent = new ConfigEntry.Builder() + .set(EDhApiLoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE) .comment("" + "If enabled, the mod will log information about the renderer buffer process. \n" + "This can be useful for debugging.") .build(); - public static ConfigEntry logRendererGLEvent = new ConfigEntry.Builder() - .set(ELoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE) + public static ConfigEntry logRendererGLEvent = new ConfigEntry.Builder() + .set(EDhApiLoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE) .comment("" + "If enabled, the mod will log information about the renderer OpenGL process. \n" + "This can be useful for debugging.") .build(); - public static ConfigEntry logFileReadWriteEvent = new ConfigEntry.Builder() - .set(ELoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE) + public static ConfigEntry logFileReadWriteEvent = new ConfigEntry.Builder() + .set(EDhApiLoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE) .comment("" + "If enabled, the mod will log information about file read/write operations. \n" + "This can be useful for debugging.") .build(); - public static ConfigEntry logFileSubDimEvent = new ConfigEntry.Builder() - .set(ELoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE) + public static ConfigEntry logFileSubDimEvent = new ConfigEntry.Builder() + .set(EDhApiLoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE) .comment("" + "If enabled, the mod will log information about file sub-dimension operations. \n" + "This can be useful for debugging.") .build(); - public static ConfigEntry logNetworkEvent = new ConfigEntry.Builder() - .set(ELoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE) + public static ConfigEntry logNetworkEvent = new ConfigEntry.Builder() + .set(EDhApiLoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE) .comment("" + "If enabled, the mod will log information about network operations. \n" + "This can be useful for debugging.") @@ -1177,25 +1126,25 @@ public class Config public static class Debugging { - public static ConfigEntry rendererMode = new ConfigEntry.Builder() - .set(ERendererMode.DEFAULT) + public static ConfigEntry rendererMode = new ConfigEntry.Builder() + .set(EDhApiRendererMode.DEFAULT) .comment("" + "What renderer is active? \n" + "\n" - + ERendererMode.DEFAULT + ": Default lod renderer \n" - + ERendererMode.DEBUG + ": Debug testing renderer \n" - + ERendererMode.DISABLED + ": Disable rendering") + + EDhApiRendererMode.DEFAULT + ": Default lod renderer \n" + + EDhApiRendererMode.DEBUG + ": Debug testing renderer \n" + + EDhApiRendererMode.DISABLED + ": Disable rendering") .build(); - public static ConfigEntry debugRendering = new ConfigEntry.Builder() - .set(EDebugRendering.OFF) + public static ConfigEntry debugRendering = new ConfigEntry.Builder() + .set(EDhApiDebugRendering.OFF) .comment("" + "Should specialized colors/rendering modes be used? \n" + "\n" - + EDebugRendering.OFF + ": LODs will be drawn with their normal colors. \n" - + EDebugRendering.SHOW_DETAIL + ": LODs' color will be based on their detail level. \n" - + EDebugRendering.SHOW_BLOCK_MATERIAL + ": LODs' color will be based on their material. \n" - + EDebugRendering.SHOW_OVERLAPPING_QUADS + ": LODs will be drawn with total white, but overlapping quads will be drawn with red. \n" + + EDhApiDebugRendering.OFF + ": LODs will be drawn with their normal colors. \n" + + EDhApiDebugRendering.SHOW_DETAIL + ": LODs' color will be based on their detail level. \n" + + EDhApiDebugRendering.SHOW_BLOCK_MATERIAL + ": LODs' color will be based on their material. \n" + + EDhApiDebugRendering.SHOW_OVERLAPPING_QUADS + ": LODs will be drawn with total white, but overlapping quads will be drawn with red. \n" + "") .build(); @@ -1319,15 +1268,15 @@ public class Config + "") .build(); - public static ConfigEntry glErrorHandlingMode = new ConfigEntry.Builder() - .set(ModInfo.IS_DEV_BUILD ? EGLErrorHandlingMode.LOG : EGLErrorHandlingMode.IGNORE) + public static ConfigEntry glErrorHandlingMode = new ConfigEntry.Builder() + .set(ModInfo.IS_DEV_BUILD ? EDhApiGLErrorHandlingMode.LOG : EDhApiGLErrorHandlingMode.IGNORE) .comment("" + "Defines how OpenGL errors are handled. \n" + "May incorrectly catch OpenGL errors thrown by other mods. \n" + "\n" - + EGLErrorHandlingMode.IGNORE + ": Do nothing. \n" - + EGLErrorHandlingMode.LOG + ": write an error to the log. \n" - + EGLErrorHandlingMode.LOG_THROW + ": write to the log and throw an exception. \n" + + EDhApiGLErrorHandlingMode.IGNORE + ": Do nothing. \n" + + EDhApiGLErrorHandlingMode.LOG + ": write an error to the log. \n" + + EDhApiGLErrorHandlingMode.LOG_THROW + ": write to the log and throw an exception. \n" + " Warning: this should only be enabled when debugging the LOD renderer \n" + " as it may break Minecraft's renderer when an exception is thrown. \n" + "") @@ -1360,14 +1309,14 @@ public class Config "") .build(); - public static ConfigEntry glProfileMode = new ConfigEntry.Builder() - .set(EGlProfileMode.CORE) + public static ConfigEntry glProfileMode = new ConfigEntry.Builder() + .set(EDhApiGlProfileMode.CORE) .comment("" + "Can be changed if you experience crashing when loading into a world.\n" + "\n" + "Defines the OpenGL context type Distant Horizon's will create. \n" + - "Generally this should be left as ["+EGlProfileMode.CORE+"] unless there is an issue with your GPU driver. \n" + - "Possible values: ["+ StringUtil.join("],[", EGlProfileMode.values())+"] \n" + + "Generally this should be left as ["+ EDhApiGlProfileMode.CORE+"] unless there is an issue with your GPU driver. \n" + + "Possible values: ["+ StringUtil.join("],[", EDhApiGlProfileMode.values())+"] \n" + "") .build(); public static ConfigEntry enableGlForwardCompatibilityMode = new ConfigEntry.Builder() @@ -1515,23 +1464,12 @@ public class Config { complicatedListenerSetupComplete = true; - try - { - // listener can only be added after the config has finished initializing - Client.Advanced.Graphics.AdvancedGraphics.overdrawPreventionPreset.addListener(OverdrawPreventionPresetConfigEventHandler.INSTANCE); - } - catch (Exception e) - { - LOGGER.error("Unexpected exception when running config delayed listener setup. Error: [" + e.getMessage() + "].", e); - } - try { // TODO automatically get all instances of AbstractPresetConfigEventHandler and fire "setUiOnlyConfigValues" ThreadPresetConfigEventHandler.INSTANCE.setUiOnlyConfigValues(); RenderQualityPresetConfigEventHandler.INSTANCE.setUiOnlyConfigValues(); QuickRenderToggleConfigEventHandler.INSTANCE.setUiOnlyConfigValues(); - OverdrawPreventionPresetConfigEventHandler.INSTANCE.setUiOnlyConfigValues(); RenderCacheConfigEventHandler.getInstance(); } catch (Exception e) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/DebugColumnConfigEventHandler.java b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/DebugColumnConfigEventHandler.java index 9e014f45f..93f55820d 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/DebugColumnConfigEventHandler.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/DebugColumnConfigEventHandler.java @@ -20,24 +20,8 @@ package com.seibel.distanthorizons.core.config.eventHandlers; import com.seibel.distanthorizons.api.DhApi; -import com.seibel.distanthorizons.api.enums.config.EHorizontalQuality; -import com.seibel.distanthorizons.api.enums.config.EMaxHorizontalResolution; -import com.seibel.distanthorizons.api.enums.config.EVerticalQuality; -import com.seibel.distanthorizons.api.enums.config.quickOptions.EQualityPreset; -import com.seibel.distanthorizons.api.enums.rendering.ETransparency; import com.seibel.distanthorizons.api.interfaces.render.IDhApiRenderProxy; -import com.seibel.distanthorizons.core.config.Config; -import com.seibel.distanthorizons.core.config.ConfigEntryWithPresetOptions; -import com.seibel.distanthorizons.core.config.eventHandlers.presets.AbstractPresetConfigEventHandler; -import com.seibel.distanthorizons.core.config.listeners.ConfigChangeListener; import com.seibel.distanthorizons.core.config.listeners.IConfigListener; -import com.seibel.distanthorizons.coreapi.interfaces.config.IConfigEntry; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; public class DebugColumnConfigEventHandler implements IConfigListener { diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/QuickRenderToggleConfigEventHandler.java b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/QuickRenderToggleConfigEventHandler.java index 1991603e3..8b6f3cb6d 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/QuickRenderToggleConfigEventHandler.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/QuickRenderToggleConfigEventHandler.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.config.eventHandlers; -import com.seibel.distanthorizons.api.enums.rendering.ERendererMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiRendererMode; import com.seibel.distanthorizons.core.config.listeners.ConfigChangeListener; import com.seibel.distanthorizons.core.config.Config; @@ -28,15 +28,15 @@ public class QuickRenderToggleConfigEventHandler public static QuickRenderToggleConfigEventHandler INSTANCE = new QuickRenderToggleConfigEventHandler(); private final ConfigChangeListener quickRenderChangeListener; - private final ConfigChangeListener rendererModeChangeListener; + private final ConfigChangeListener rendererModeChangeListener; /** private since we only ever need one handler at a time */ private QuickRenderToggleConfigEventHandler() { - this.quickRenderChangeListener = new ConfigChangeListener<>(Config.Client.quickEnableRendering, (val) -> { Config.Client.Advanced.Debugging.rendererMode.set(Config.Client.quickEnableRendering.get() ? ERendererMode.DEFAULT : ERendererMode.DISABLED); }); - this.rendererModeChangeListener = new ConfigChangeListener<>(Config.Client.Advanced.Debugging.rendererMode, (val) -> { Config.Client.quickEnableRendering.set(Config.Client.Advanced.Debugging.rendererMode.get() != ERendererMode.DISABLED); }); + this.quickRenderChangeListener = new ConfigChangeListener<>(Config.Client.quickEnableRendering, (val) -> { Config.Client.Advanced.Debugging.rendererMode.set(Config.Client.quickEnableRendering.get() ? EDhApiRendererMode.DEFAULT : EDhApiRendererMode.DISABLED); }); + this.rendererModeChangeListener = new ConfigChangeListener<>(Config.Client.Advanced.Debugging.rendererMode, (val) -> { Config.Client.quickEnableRendering.set(Config.Client.Advanced.Debugging.rendererMode.get() != EDhApiRendererMode.DISABLED); }); } /** @@ -45,7 +45,7 @@ public class QuickRenderToggleConfigEventHandler */ public void setUiOnlyConfigValues() { - Config.Client.quickEnableRendering.set(Config.Client.Advanced.Debugging.rendererMode.get() != ERendererMode.DISABLED); + Config.Client.quickEnableRendering.set(Config.Client.Advanced.Debugging.rendererMode.get() != EDhApiRendererMode.DISABLED); } } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/RenderCacheConfigEventHandler.java b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/RenderCacheConfigEventHandler.java index 1a169aa97..6e3901462 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/RenderCacheConfigEventHandler.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/RenderCacheConfigEventHandler.java @@ -20,13 +20,12 @@ package com.seibel.distanthorizons.core.config.eventHandlers; import com.seibel.distanthorizons.api.DhApi; -import com.seibel.distanthorizons.api.enums.config.EBlocksToAvoid; -import com.seibel.distanthorizons.api.enums.config.ELodShading; -import com.seibel.distanthorizons.api.enums.config.EMaxHorizontalResolution; -import com.seibel.distanthorizons.api.enums.config.EVerticalQuality; -import com.seibel.distanthorizons.api.enums.rendering.ETransparency; +import com.seibel.distanthorizons.api.enums.config.EDhApiBlocksToAvoid; +import com.seibel.distanthorizons.api.enums.config.EDhApiLodShading; +import com.seibel.distanthorizons.api.enums.config.EDhApiMaxHorizontalResolution; +import com.seibel.distanthorizons.api.enums.config.EDhApiVerticalQuality; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiTransparency; import com.seibel.distanthorizons.core.config.listeners.ConfigChangeListener; -import com.seibel.distanthorizons.core.config.listeners.IConfigListener; import com.seibel.distanthorizons.core.config.Config; import com.seibel.distanthorizons.core.util.TimerUtil; @@ -45,15 +44,15 @@ public class RenderCacheConfigEventHandler // previous values used to check if a watched setting was actually modified - private final ConfigChangeListener horizontalResolutionChangeListener; - private final ConfigChangeListener verticalQualityChangeListener; - private final ConfigChangeListener transparencyChangeListener; - private final ConfigChangeListener blocksToIgnoreChangeListener; + private final ConfigChangeListener horizontalResolutionChangeListener; + private final ConfigChangeListener verticalQualityChangeListener; + private final ConfigChangeListener transparencyChangeListener; + private final ConfigChangeListener blocksToIgnoreChangeListener; private final ConfigChangeListener tintWithAvoidedBlocksChangeListener; private final ConfigChangeListener brightnessMultiplierChangeListener; private final ConfigChangeListener saturationMultiplierChangeListener; - private final ConfigChangeListener lodShadingChangeListener; + private final ConfigChangeListener lodShadingChangeListener; /** how long to wait in milliseconds before applying the config changes */ private static final long TIMEOUT_IN_MS = 4_000L; diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/OverdrawPreventionPresetConfigEventHandler.java b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/OverdrawPreventionPresetConfigEventHandler.java deleted file mode 100644 index 216238d53..000000000 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/OverdrawPreventionPresetConfigEventHandler.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * This file is part of the Distant Horizons mod - * licensed under the GNU LGPL v3 License. - * - * Copyright (C) 2020-2023 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.distanthorizons.core.config.eventHandlers.presets; - -import com.seibel.distanthorizons.api.enums.config.EMaxHorizontalResolution; -import com.seibel.distanthorizons.api.enums.config.EOverdrawPrevention; -import com.seibel.distanthorizons.api.enums.config.quickOptions.EQualityPreset; -import com.seibel.distanthorizons.core.config.Config; -import com.seibel.distanthorizons.core.config.ConfigEntryWithPresetOptions; -import com.seibel.distanthorizons.core.config.listeners.ConfigChangeListener; -import com.seibel.distanthorizons.coreapi.interfaces.config.IConfigEntry; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; - -public class OverdrawPreventionPresetConfigEventHandler extends AbstractPresetConfigEventHandler -{ - public static final OverdrawPreventionPresetConfigEventHandler INSTANCE = new OverdrawPreventionPresetConfigEventHandler(); - - private static final Logger LOGGER = LogManager.getLogger(); - - - private final ConfigEntryWithPresetOptions overdrawPrevention = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.Graphics.AdvancedGraphics.overdrawPrevention, - new HashMap() - {{ - this.put(EOverdrawPrevention.HEAVY, 0.6); - this.put(EOverdrawPrevention.MEDIUM, 0.4); - this.put(EOverdrawPrevention.LIGHT, 0.25); - this.put(EOverdrawPrevention.NONE, 0.0); - }}); - - - - //==============// - // constructors // - //==============// - - /** private since we only ever need one handler at a time */ - private OverdrawPreventionPresetConfigEventHandler() - { - // add each config used by this preset - this.configList.add(this.overdrawPrevention); - - - for (ConfigEntryWithPresetOptions config : this.configList) - { - // ignore try-using, the listener should only ever be added once and should never be removed - new ConfigChangeListener<>(config.configEntry, (val) -> { this.onConfigValueChanged(); }); - } - } - - - - //==============// - // enum getters // - //==============// - - @Override - protected IConfigEntry getPresetConfigEntry() { return Config.Client.Advanced.Graphics.AdvancedGraphics.overdrawPreventionPreset; } - - @Override - protected List getPresetEnumList() { return Arrays.asList(EOverdrawPrevention.values()); } - @Override - protected EOverdrawPrevention getCustomPresetEnum() { return EOverdrawPrevention.CUSTOM; } - -} diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/RenderQualityPresetConfigEventHandler.java b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/RenderQualityPresetConfigEventHandler.java index 3ac0f6f78..85f1e1b40 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/RenderQualityPresetConfigEventHandler.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/RenderQualityPresetConfigEventHandler.java @@ -19,11 +19,11 @@ package com.seibel.distanthorizons.core.config.eventHandlers.presets; -import com.seibel.distanthorizons.api.enums.config.EHorizontalQuality; -import com.seibel.distanthorizons.api.enums.config.EMaxHorizontalResolution; -import com.seibel.distanthorizons.api.enums.config.EVerticalQuality; -import com.seibel.distanthorizons.api.enums.config.quickOptions.EQualityPreset; -import com.seibel.distanthorizons.api.enums.rendering.ETransparency; +import com.seibel.distanthorizons.api.enums.config.EDhApiHorizontalQuality; +import com.seibel.distanthorizons.api.enums.config.EDhApiMaxHorizontalResolution; +import com.seibel.distanthorizons.api.enums.config.EDhApiVerticalQuality; +import com.seibel.distanthorizons.api.enums.config.quickOptions.EDhApiQualityPreset; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiTransparency; import com.seibel.distanthorizons.core.config.Config; import com.seibel.distanthorizons.core.config.ConfigEntryWithPresetOptions; import com.seibel.distanthorizons.core.config.listeners.ConfigChangeListener; @@ -33,57 +33,57 @@ import org.apache.logging.log4j.Logger; import java.util.*; -public class RenderQualityPresetConfigEventHandler extends AbstractPresetConfigEventHandler +public class RenderQualityPresetConfigEventHandler extends AbstractPresetConfigEventHandler { public static final RenderQualityPresetConfigEventHandler INSTANCE = new RenderQualityPresetConfigEventHandler(); private static final Logger LOGGER = LogManager.getLogger(); - private final ConfigEntryWithPresetOptions drawResolution = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.Graphics.Quality.maxHorizontalResolution, - new HashMap() + private final ConfigEntryWithPresetOptions drawResolution = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.Graphics.Quality.maxHorizontalResolution, + new HashMap() {{ - 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); + this.put(EDhApiQualityPreset.MINIMUM, EDhApiMaxHorizontalResolution.TWO_BLOCKS); + this.put(EDhApiQualityPreset.LOW, EDhApiMaxHorizontalResolution.BLOCK); + this.put(EDhApiQualityPreset.MEDIUM, EDhApiMaxHorizontalResolution.BLOCK); + this.put(EDhApiQualityPreset.HIGH, EDhApiMaxHorizontalResolution.BLOCK); + this.put(EDhApiQualityPreset.EXTREME, EDhApiMaxHorizontalResolution.BLOCK); }}); - private final ConfigEntryWithPresetOptions verticalQuality = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.Graphics.Quality.verticalQuality, - new HashMap() + private final ConfigEntryWithPresetOptions verticalQuality = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.Graphics.Quality.verticalQuality, + new HashMap() {{ - this.put(EQualityPreset.MINIMUM, EVerticalQuality.HEIGHT_MAP); - this.put(EQualityPreset.LOW, EVerticalQuality.LOW); - this.put(EQualityPreset.MEDIUM, EVerticalQuality.MEDIUM); - this.put(EQualityPreset.HIGH, EVerticalQuality.HIGH); - this.put(EQualityPreset.EXTREME, EVerticalQuality.EXTREME); + this.put(EDhApiQualityPreset.MINIMUM, EDhApiVerticalQuality.HEIGHT_MAP); + this.put(EDhApiQualityPreset.LOW, EDhApiVerticalQuality.LOW); + this.put(EDhApiQualityPreset.MEDIUM, EDhApiVerticalQuality.MEDIUM); + this.put(EDhApiQualityPreset.HIGH, EDhApiVerticalQuality.HIGH); + this.put(EDhApiQualityPreset.EXTREME, EDhApiVerticalQuality.EXTREME); }}); - private final ConfigEntryWithPresetOptions horizontalQuality = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.Graphics.Quality.horizontalQuality, - new HashMap() + private final ConfigEntryWithPresetOptions horizontalQuality = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.Graphics.Quality.horizontalQuality, + new HashMap() {{ - this.put(EQualityPreset.MINIMUM, EHorizontalQuality.LOWEST); - this.put(EQualityPreset.LOW, EHorizontalQuality.LOW); - this.put(EQualityPreset.MEDIUM, EHorizontalQuality.MEDIUM); - this.put(EQualityPreset.HIGH, EHorizontalQuality.HIGH); - this.put(EQualityPreset.EXTREME, EHorizontalQuality.EXTREME); + this.put(EDhApiQualityPreset.MINIMUM, EDhApiHorizontalQuality.LOWEST); + this.put(EDhApiQualityPreset.LOW, EDhApiHorizontalQuality.LOW); + this.put(EDhApiQualityPreset.MEDIUM, EDhApiHorizontalQuality.MEDIUM); + this.put(EDhApiQualityPreset.HIGH, EDhApiHorizontalQuality.HIGH); + this.put(EDhApiQualityPreset.EXTREME, EDhApiHorizontalQuality.EXTREME); }}); - private final ConfigEntryWithPresetOptions transparency = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.Graphics.Quality.transparency, - new HashMap() + private final ConfigEntryWithPresetOptions transparency = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.Graphics.Quality.transparency, + new HashMap() {{ - this.put(EQualityPreset.MINIMUM, ETransparency.DISABLED); - this.put(EQualityPreset.LOW, ETransparency.DISABLED); // should be fake if/when fake is fixed - this.put(EQualityPreset.MEDIUM, ETransparency.COMPLETE); - this.put(EQualityPreset.HIGH, ETransparency.COMPLETE); - this.put(EQualityPreset.EXTREME, ETransparency.COMPLETE); + this.put(EDhApiQualityPreset.MINIMUM, EDhApiTransparency.DISABLED); + this.put(EDhApiQualityPreset.LOW, EDhApiTransparency.DISABLED); // should be fake if/when fake is fixed + this.put(EDhApiQualityPreset.MEDIUM, EDhApiTransparency.COMPLETE); + this.put(EDhApiQualityPreset.HIGH, EDhApiTransparency.COMPLETE); + this.put(EDhApiQualityPreset.EXTREME, EDhApiTransparency.COMPLETE); }}); - private final ConfigEntryWithPresetOptions ssaoEnabled = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.Graphics.Ssao.enabled, - new HashMap() + private final ConfigEntryWithPresetOptions ssaoEnabled = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.Graphics.Ssao.enabled, + new HashMap() {{ - this.put(EQualityPreset.MINIMUM, false); - this.put(EQualityPreset.LOW, false); - this.put(EQualityPreset.MEDIUM, true); - this.put(EQualityPreset.HIGH, true); - this.put(EQualityPreset.EXTREME, true); + this.put(EDhApiQualityPreset.MINIMUM, false); + this.put(EDhApiQualityPreset.LOW, false); + this.put(EDhApiQualityPreset.MEDIUM, true); + this.put(EDhApiQualityPreset.HIGH, true); + this.put(EDhApiQualityPreset.EXTREME, true); }}); @@ -103,7 +103,7 @@ public class RenderQualityPresetConfigEventHandler extends AbstractPresetConfigE this.configList.add(this.ssaoEnabled); - for (ConfigEntryWithPresetOptions config : this.configList) + for (ConfigEntryWithPresetOptions config : this.configList) { // ignore try-using, the listener should only ever be added once and should never be removed new ConfigChangeListener<>(config.configEntry, (val) -> { this.onConfigValueChanged(); }); @@ -117,11 +117,11 @@ public class RenderQualityPresetConfigEventHandler extends AbstractPresetConfigE //==============// @Override - protected IConfigEntry getPresetConfigEntry() { return Config.Client.qualityPresetSetting; } + protected IConfigEntry getPresetConfigEntry() { return Config.Client.qualityPresetSetting; } @Override - protected List getPresetEnumList() { return Arrays.asList(EQualityPreset.values()); } + protected List getPresetEnumList() { return Arrays.asList(EDhApiQualityPreset.values()); } @Override - protected EQualityPreset getCustomPresetEnum() { return EQualityPreset.CUSTOM; } + protected EDhApiQualityPreset getCustomPresetEnum() { return EDhApiQualityPreset.CUSTOM; } } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/ThreadPresetConfigEventHandler.java b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/ThreadPresetConfigEventHandler.java index fee7bb252..0a25d0695 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/ThreadPresetConfigEventHandler.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/presets/ThreadPresetConfigEventHandler.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.config.eventHandlers.presets; -import com.seibel.distanthorizons.api.enums.config.quickOptions.EThreadPreset; +import com.seibel.distanthorizons.api.enums.config.quickOptions.EDhApiThreadPreset; import com.seibel.distanthorizons.core.config.listeners.ConfigChangeListener; import com.seibel.distanthorizons.core.config.Config; import com.seibel.distanthorizons.core.config.ConfigEntryWithPresetOptions; @@ -32,7 +32,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.List; -public class ThreadPresetConfigEventHandler extends AbstractPresetConfigEventHandler +public class ThreadPresetConfigEventHandler extends AbstractPresetConfigEventHandler { public static final ThreadPresetConfigEventHandler INSTANCE = new ThreadPresetConfigEventHandler(); @@ -42,90 +42,90 @@ public class ThreadPresetConfigEventHandler extends AbstractPresetConfigEventHan public static int getWorldGenDefaultThreadCount() { return getThreadCountByPercent(0.15); } - private final ConfigEntryWithPresetOptions worldGenThreadCount = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.numberOfWorldGenerationThreads, - new HashMap() + private final ConfigEntryWithPresetOptions worldGenThreadCount = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.numberOfWorldGenerationThreads, + new HashMap() {{ - this.put(EThreadPreset.MINIMAL_IMPACT, 1); - this.put(EThreadPreset.LOW_IMPACT, getWorldGenDefaultThreadCount()); - this.put(EThreadPreset.BALANCED, getThreadCountByPercent(0.25)); - this.put(EThreadPreset.AGGRESSIVE, getThreadCountByPercent(0.5)); - this.put(EThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, getThreadCountByPercent(1.0)); + this.put(EDhApiThreadPreset.MINIMAL_IMPACT, 1); + this.put(EDhApiThreadPreset.LOW_IMPACT, getWorldGenDefaultThreadCount()); + this.put(EDhApiThreadPreset.BALANCED, getThreadCountByPercent(0.25)); + this.put(EDhApiThreadPreset.AGGRESSIVE, getThreadCountByPercent(0.5)); + this.put(EDhApiThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, getThreadCountByPercent(1.0)); }}); public static double getWorldGenDefaultRunTimeRatio() { return LOW_THREAD_COUNT_CPU ? 0.5 : 0.75; } - private final ConfigEntryWithPresetOptions worldGenRunTime = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.runTimeRatioForWorldGenerationThreads, - new HashMap() + private final ConfigEntryWithPresetOptions worldGenRunTime = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.runTimeRatioForWorldGenerationThreads, + new HashMap() {{ - this.put(EThreadPreset.MINIMAL_IMPACT, LOW_THREAD_COUNT_CPU ? 0.1 : 0.25); - this.put(EThreadPreset.LOW_IMPACT, getWorldGenDefaultRunTimeRatio()); - this.put(EThreadPreset.BALANCED, LOW_THREAD_COUNT_CPU ? 0.5 : 0.75); - this.put(EThreadPreset.AGGRESSIVE, LOW_THREAD_COUNT_CPU ? 0.75 : 1.0); - this.put(EThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, 1.0); + this.put(EDhApiThreadPreset.MINIMAL_IMPACT, LOW_THREAD_COUNT_CPU ? 0.1 : 0.25); + this.put(EDhApiThreadPreset.LOW_IMPACT, getWorldGenDefaultRunTimeRatio()); + this.put(EDhApiThreadPreset.BALANCED, LOW_THREAD_COUNT_CPU ? 0.5 : 0.75); + this.put(EDhApiThreadPreset.AGGRESSIVE, LOW_THREAD_COUNT_CPU ? 0.75 : 1.0); + this.put(EDhApiThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, 1.0); }}); public static int getFileHandlerDefaultThreadCount() { return getThreadCountByPercent(0.1); } - private final ConfigEntryWithPresetOptions fileHandlerThreadCount = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.numberOfFileHandlerThreads, - new HashMap() + private final ConfigEntryWithPresetOptions fileHandlerThreadCount = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.numberOfFileHandlerThreads, + new HashMap() {{ - this.put(EThreadPreset.MINIMAL_IMPACT, 1); - this.put(EThreadPreset.LOW_IMPACT, getFileHandlerDefaultThreadCount()); - this.put(EThreadPreset.BALANCED, getThreadCountByPercent(0.2)); - this.put(EThreadPreset.AGGRESSIVE, getThreadCountByPercent(0.2)); - this.put(EThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, getThreadCountByPercent(1.0)); + this.put(EDhApiThreadPreset.MINIMAL_IMPACT, 1); + this.put(EDhApiThreadPreset.LOW_IMPACT, getFileHandlerDefaultThreadCount()); + this.put(EDhApiThreadPreset.BALANCED, getThreadCountByPercent(0.2)); + this.put(EDhApiThreadPreset.AGGRESSIVE, getThreadCountByPercent(0.2)); + this.put(EDhApiThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, getThreadCountByPercent(1.0)); }}); public static double getFileHandlerDefaultRunTimeRatio() { return 0.5; } - private final ConfigEntryWithPresetOptions fileHandlerRunTime = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.runTimeRatioForFileHandlerThreads, - new HashMap() + private final ConfigEntryWithPresetOptions fileHandlerRunTime = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.runTimeRatioForFileHandlerThreads, + new HashMap() {{ - this.put(EThreadPreset.MINIMAL_IMPACT, 0.25); - this.put(EThreadPreset.LOW_IMPACT, getFileHandlerDefaultRunTimeRatio()); - this.put(EThreadPreset.BALANCED, 0.75); - this.put(EThreadPreset.AGGRESSIVE, 1.0); - this.put(EThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, 1.0); + this.put(EDhApiThreadPreset.MINIMAL_IMPACT, 0.25); + this.put(EDhApiThreadPreset.LOW_IMPACT, getFileHandlerDefaultRunTimeRatio()); + this.put(EDhApiThreadPreset.BALANCED, 0.75); + this.put(EDhApiThreadPreset.AGGRESSIVE, 1.0); + this.put(EDhApiThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, 1.0); }}); public static int getUpdatePropagatorDefaultThreadCount() { return getThreadCountByPercent(0.5); } - private final ConfigEntryWithPresetOptions UpdatePropagatorThreadCount = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.numberOfUpdatePropagatorThreads, - new HashMap() + private final ConfigEntryWithPresetOptions UpdatePropagatorThreadCount = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.numberOfUpdatePropagatorThreads, + new HashMap() {{ - this.put(EThreadPreset.MINIMAL_IMPACT, 1); - this.put(EThreadPreset.LOW_IMPACT, getUpdatePropagatorDefaultThreadCount()); - this.put(EThreadPreset.BALANCED, getThreadCountByPercent(0.75)); - this.put(EThreadPreset.AGGRESSIVE, getThreadCountByPercent(0.75)); - this.put(EThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, getThreadCountByPercent(1.0)); + this.put(EDhApiThreadPreset.MINIMAL_IMPACT, 1); + this.put(EDhApiThreadPreset.LOW_IMPACT, getUpdatePropagatorDefaultThreadCount()); + this.put(EDhApiThreadPreset.BALANCED, getThreadCountByPercent(0.75)); + this.put(EDhApiThreadPreset.AGGRESSIVE, getThreadCountByPercent(0.75)); + this.put(EDhApiThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, getThreadCountByPercent(1.0)); }}); public static double getUpdatePropagatorDefaultRunTimeRatio() { return 0.25; } - private final ConfigEntryWithPresetOptions UpdatePropagatorRunTime = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.runTimeRatioForUpdatePropagatorThreads, - new HashMap() + private final ConfigEntryWithPresetOptions UpdatePropagatorRunTime = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.runTimeRatioForUpdatePropagatorThreads, + new HashMap() {{ - this.put(EThreadPreset.MINIMAL_IMPACT, 0.25); - this.put(EThreadPreset.LOW_IMPACT, getUpdatePropagatorDefaultRunTimeRatio()); - this.put(EThreadPreset.BALANCED, 0.5); - this.put(EThreadPreset.AGGRESSIVE, 1.0); - this.put(EThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, 1.0); + this.put(EDhApiThreadPreset.MINIMAL_IMPACT, 0.25); + this.put(EDhApiThreadPreset.LOW_IMPACT, getUpdatePropagatorDefaultRunTimeRatio()); + this.put(EDhApiThreadPreset.BALANCED, 0.5); + this.put(EDhApiThreadPreset.AGGRESSIVE, 1.0); + this.put(EDhApiThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, 1.0); }}); public static int getLodBuilderDefaultThreadCount() { return getThreadCountByPercent(0.1); } - private final ConfigEntryWithPresetOptions lodBuilderThreadCount = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.numberOfLodBuilderThreads, - new HashMap() + private final ConfigEntryWithPresetOptions lodBuilderThreadCount = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.numberOfLodBuilderThreads, + new HashMap() {{ - this.put(EThreadPreset.MINIMAL_IMPACT, 1); - this.put(EThreadPreset.LOW_IMPACT, getLodBuilderDefaultThreadCount()); - this.put(EThreadPreset.BALANCED, getThreadCountByPercent(0.2)); - this.put(EThreadPreset.AGGRESSIVE, getThreadCountByPercent(0.4)); - this.put(EThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, getThreadCountByPercent(1.0)); + this.put(EDhApiThreadPreset.MINIMAL_IMPACT, 1); + this.put(EDhApiThreadPreset.LOW_IMPACT, getLodBuilderDefaultThreadCount()); + this.put(EDhApiThreadPreset.BALANCED, getThreadCountByPercent(0.2)); + this.put(EDhApiThreadPreset.AGGRESSIVE, getThreadCountByPercent(0.4)); + this.put(EDhApiThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, getThreadCountByPercent(1.0)); }}); public static double getLodBuilderDefaultRunTimeRatio() { return LOW_THREAD_COUNT_CPU ? 0.25 : 0.5; } - private final ConfigEntryWithPresetOptions lodBuilderRunTime = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.runTimeRatioForLodBuilderThreads, - new HashMap() + private final ConfigEntryWithPresetOptions lodBuilderRunTime = new ConfigEntryWithPresetOptions<>(Config.Client.Advanced.MultiThreading.runTimeRatioForLodBuilderThreads, + new HashMap() {{ - this.put(EThreadPreset.MINIMAL_IMPACT, 0.1); - this.put(EThreadPreset.LOW_IMPACT, getLodBuilderDefaultRunTimeRatio()); - this.put(EThreadPreset.BALANCED, LOW_THREAD_COUNT_CPU ? 0.5 : 0.75); - this.put(EThreadPreset.AGGRESSIVE, 1.0); - this.put(EThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, 1.0); + this.put(EDhApiThreadPreset.MINIMAL_IMPACT, 0.1); + this.put(EDhApiThreadPreset.LOW_IMPACT, getLodBuilderDefaultRunTimeRatio()); + this.put(EDhApiThreadPreset.BALANCED, LOW_THREAD_COUNT_CPU ? 0.5 : 0.75); + this.put(EDhApiThreadPreset.AGGRESSIVE, 1.0); + this.put(EDhApiThreadPreset.I_PAID_FOR_THE_WHOLE_CPU, 1.0); }}); @@ -151,7 +151,7 @@ public class ThreadPresetConfigEventHandler extends AbstractPresetConfigEventHan this.configList.add(this.lodBuilderRunTime); - for (ConfigEntryWithPresetOptions config : this.configList) + for (ConfigEntryWithPresetOptions config : this.configList) { // ignore try-using, the listeners should only ever be added once and should never be removed new ConfigChangeListener<>(config.configEntry, (val) -> { this.onConfigValueChanged(); }); @@ -196,11 +196,11 @@ public class ThreadPresetConfigEventHandler extends AbstractPresetConfigEventHan //==============// @Override - protected IConfigEntry getPresetConfigEntry() { return Config.Client.threadPresetSetting; } + protected IConfigEntry getPresetConfigEntry() { return Config.Client.threadPresetSetting; } @Override - protected List getPresetEnumList() { return Arrays.asList(EThreadPreset.values()); } + protected List getPresetEnumList() { return Arrays.asList(EDhApiThreadPreset.values()); } @Override - protected EThreadPreset getCustomPresetEnum() { return EThreadPreset.CUSTOM; } + protected EDhApiThreadPreset getCustomPresetEnum() { return EDhApiThreadPreset.CUSTOM; } } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/gui/OpenGLConfigScreen.java b/core/src/main/java/com/seibel/distanthorizons/core/config/gui/OpenGLConfigScreen.java index 71dad5506..35a6cf353 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/gui/OpenGLConfigScreen.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/gui/OpenGLConfigScreen.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.config.gui; -import com.seibel.distanthorizons.api.enums.config.EGpuUploadMethod; +import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod; import com.seibel.distanthorizons.core.render.glObject.GLProxy; import com.seibel.distanthorizons.core.render.glObject.GLState; import com.seibel.distanthorizons.core.render.glObject.buffer.GLVertexBuffer; @@ -76,7 +76,7 @@ public class OpenGLConfigScreen extends AbstractScreen buffer.rewind(); GLVertexBuffer vbo = new GLVertexBuffer(false); vbo.bind(); - vbo.uploadBuffer(buffer, 4, EGpuUploadMethod.DATA, vertices.length * Float.BYTES); + vbo.uploadBuffer(buffer, 4, EDhApiGpuUploadMethod.DATA, vertices.length * Float.BYTES); return vbo; } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/ColumnRenderBuffer.java b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/ColumnRenderBuffer.java index 796aebd4c..05eb3b340 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/ColumnRenderBuffer.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/ColumnRenderBuffer.java @@ -25,13 +25,12 @@ import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector; import com.seibel.distanthorizons.core.enums.EGLProxyContext; import com.seibel.distanthorizons.core.logging.DhLoggerBuilder; import com.seibel.distanthorizons.core.pos.DhBlockPos; -import com.seibel.distanthorizons.core.pos.DhSectionPos; import com.seibel.distanthorizons.core.render.glObject.GLProxy; import com.seibel.distanthorizons.core.render.glObject.buffer.GLVertexBuffer; import com.seibel.distanthorizons.core.render.renderer.LodRenderer; import com.seibel.distanthorizons.core.util.LodUtil; import com.seibel.distanthorizons.core.util.objects.StatsMap; -import com.seibel.distanthorizons.api.enums.config.EGpuUploadMethod; +import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod; import com.seibel.distanthorizons.core.util.*; import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper; import org.apache.logging.log4j.Logger; @@ -88,7 +87,7 @@ public class ColumnRenderBuffer implements AutoCloseable //==================// /** Should be run on a DH thread. */ - public void uploadBuffer(LodQuadBuilder builder, EGpuUploadMethod gpuUploadMethod) throws InterruptedException + public void uploadBuffer(LodQuadBuilder builder, EDhApiGpuUploadMethod gpuUploadMethod) throws InterruptedException { LodUtil.assertTrue(Thread.currentThread().getName().startsWith(ThreadUtil.THREAD_NAME_PREFIX), "Buffer uploading needs to be done on a DH thread to prevent locking up any MC threads."); @@ -147,7 +146,7 @@ public class ColumnRenderBuffer implements AutoCloseable } } - private void uploadBuffersUsingUploadMethod(LodQuadBuilder builder, EGpuUploadMethod gpuUploadMethod) throws InterruptedException + private void uploadBuffersUsingUploadMethod(LodQuadBuilder builder, EDhApiGpuUploadMethod gpuUploadMethod) throws InterruptedException { if (gpuUploadMethod.useEarlyMapping) { @@ -163,7 +162,7 @@ public class ColumnRenderBuffer implements AutoCloseable - private void uploadBuffersMapped(LodQuadBuilder builder, EGpuUploadMethod method) + private void uploadBuffersMapped(LodQuadBuilder builder, EDhApiGpuUploadMethod method) { // opaque vbos // @@ -199,7 +198,7 @@ public class ColumnRenderBuffer implements AutoCloseable } } - private void uploadBuffersDirect(LodQuadBuilder builder, EGpuUploadMethod method) throws InterruptedException + private void uploadBuffersDirect(LodQuadBuilder builder, EDhApiGpuUploadMethod method) throws InterruptedException { this.vbos = ColumnRenderBufferBuilder.resizeBuffer(this.vbos, builder.getCurrentNeededOpaqueVertexBufferCount()); uploadBuffersDirect(this.vbos, builder.makeOpaqueVertexBuffers(), method); @@ -207,7 +206,7 @@ public class ColumnRenderBuffer implements AutoCloseable this.vbosTransparent = ColumnRenderBufferBuilder.resizeBuffer(this.vbosTransparent, builder.getCurrentNeededTransparentVertexBufferCount()); uploadBuffersDirect(this.vbosTransparent, builder.makeTransparentVertexBuffers(), method); } - private static void uploadBuffersDirect(GLVertexBuffer[] vbos, Iterator iter, EGpuUploadMethod method) throws InterruptedException + private static void uploadBuffersDirect(GLVertexBuffer[] vbos, Iterator iter, EDhApiGpuUploadMethod method) throws InterruptedException { long remainingMS = 0; long MBPerMS = Config.Client.Advanced.GpuBuffers.gpuUploadPerMegabyteInMilliseconds.get(); diff --git a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/ColumnRenderBufferBuilder.java b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/ColumnRenderBufferBuilder.java index 6a7ab9380..6598c2e06 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/ColumnRenderBufferBuilder.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/ColumnRenderBufferBuilder.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.dataObjects.render.bufferBuilding; -import com.seibel.distanthorizons.api.enums.rendering.EDebugRendering; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiDebugRendering; import com.seibel.distanthorizons.core.enums.EDhDirection; import com.seibel.distanthorizons.core.config.Config; import com.seibel.distanthorizons.core.dataObjects.render.ColumnRenderSource; @@ -152,7 +152,7 @@ public class ColumnRenderBufferBuilder private static void makeLodRenderData(LodQuadBuilder quadBuilder, ColumnRenderSource renderSource, ColumnRenderSource[] adjRegions) { // Variable initialization - EDebugRendering debugMode = Config.Client.Advanced.Debugging.debugRendering.get(); + EDhApiDebugRendering debugMode = Config.Client.Advanced.Debugging.debugRendering.get(); // can be used 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/distanthorizons/core/dataObjects/render/bufferBuilding/CubicLodTemplate.java b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/CubicLodTemplate.java index dbfebb5d5..ff0ecfd42 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/CubicLodTemplate.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/CubicLodTemplate.java @@ -25,7 +25,7 @@ import com.seibel.distanthorizons.core.pos.DhLodPos; import com.seibel.distanthorizons.core.util.ColorUtil; import com.seibel.distanthorizons.core.util.LodUtil; import com.seibel.distanthorizons.core.util.RenderDataPointUtil; -import com.seibel.distanthorizons.api.enums.rendering.EDebugRendering; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiDebugRendering; import com.seibel.distanthorizons.core.dataObjects.render.columnViews.ColumnArrayView; import com.seibel.distanthorizons.core.wrapperInterfaces.block.IBlockStateWrapper; import com.seibel.distanthorizons.coreapi.util.BitShiftUtil; @@ -42,7 +42,7 @@ public class CubicLodTemplate public static void addLodToBuffer( long data, long topData, long bottomData, ColumnArrayView[][] adjColumnViews, byte detailLevel, int offsetPosX, int offsetOosZ, LodQuadBuilder quadBuilder, - EDebugRendering debugging, ColumnRenderSource.DebugSourceFlag debugSource) + EDhApiDebugRendering debugging, ColumnRenderSource.DebugSourceFlag debugSource) { DhLodPos blockOffsetPos = new DhLodPos(detailLevel, offsetPosX, offsetOosZ).convertToDetailLevel(LodUtil.BLOCK_DETAIL_LEVEL); @@ -88,12 +88,6 @@ public class CubicLodTemplate break; } case SHOW_DETAIL: - case SHOW_GENMODE: - { - color = LodUtil.DEBUG_DETAIL_LEVEL_COLORS[detailLevel]; - fullBright = true; - break; - } case SHOW_BLOCK_MATERIAL: { switch (blockMaterialId) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/LodQuadBuilder.java b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/LodQuadBuilder.java index 29acdd418..87f16a9c7 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/LodQuadBuilder.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/bufferBuilding/LodQuadBuilder.java @@ -27,7 +27,7 @@ import com.seibel.distanthorizons.core.enums.EDhDirection; import com.seibel.distanthorizons.core.logging.DhLoggerBuilder; import com.seibel.distanthorizons.core.render.glObject.buffer.GLVertexBuffer; import com.seibel.distanthorizons.core.util.ColorUtil; -import com.seibel.distanthorizons.api.enums.config.EGpuUploadMethod; +import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod; import com.seibel.distanthorizons.coreapi.util.MathUtil; import org.apache.logging.log4j.Logger; @@ -524,7 +524,7 @@ public class LodQuadBuilder } - public BufferFiller makeOpaqueBufferFiller(EGpuUploadMethod method) + public BufferFiller makeOpaqueBufferFiller(EDhApiGpuUploadMethod method) { return new BufferFiller() { @@ -604,7 +604,7 @@ public class LodQuadBuilder }; } - public BufferFiller makeTransparentBufferFiller(EGpuUploadMethod method) + public BufferFiller makeTransparentBufferFiller(EDhApiGpuUploadMethod method) { return new BufferFiller() { diff --git a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/transformers/FullDataToRenderDataTransformer.java b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/transformers/FullDataToRenderDataTransformer.java index 65c3636e0..2aabb2e71 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/transformers/FullDataToRenderDataTransformer.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/transformers/FullDataToRenderDataTransformer.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.dataObjects.transformers; -import com.seibel.distanthorizons.api.enums.config.EBlocksToAvoid; +import com.seibel.distanthorizons.api.enums.config.EDhApiBlocksToAvoid; import com.seibel.distanthorizons.core.config.Config; import com.seibel.distanthorizons.core.dataObjects.fullData.FullDataPointIdMap; import com.seibel.distanthorizons.core.dataObjects.fullData.sources.FullDataSourceV2; @@ -163,7 +163,7 @@ public class FullDataToRenderDataTransformer int blockX, int blockZ, ColumnArrayView renderColumnData, LongArrayList fullColumnData) { - boolean avoidSolidBlocks = (Config.Client.Advanced.Graphics.Quality.blocksToIgnore.get() == EBlocksToAvoid.NON_COLLIDING); + boolean avoidSolidBlocks = (Config.Client.Advanced.Graphics.Quality.blocksToIgnore.get() == EDhApiBlocksToAvoid.NON_COLLIDING); boolean colorBelowWithAvoidedBlocks = Config.Client.Advanced.Graphics.Quality.tintWithAvoidedBlocks.get(); HashSet blockStatesToIgnore = WRAPPER_FACTORY.getRendererIgnoredBlocks(level.getLevelWrapper()); diff --git a/core/src/main/java/com/seibel/distanthorizons/core/file/structure/ClientOnlySaveStructure.java b/core/src/main/java/com/seibel/distanthorizons/core/file/structure/ClientOnlySaveStructure.java index a0b900f8d..6e9809934 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/file/structure/ClientOnlySaveStructure.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/file/structure/ClientOnlySaveStructure.java @@ -23,7 +23,7 @@ import com.google.common.net.PercentEscaper; import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector; import com.seibel.distanthorizons.core.file.subDimMatching.SubDimensionLevelMatcher; import com.seibel.distanthorizons.core.config.Config; -import com.seibel.distanthorizons.api.enums.config.EServerFolderNameMode; +import com.seibel.distanthorizons.api.enums.config.EDhApiServerFolderNameMode; import com.seibel.distanthorizons.core.level.IServerKeyedClientLevel; import com.seibel.distanthorizons.core.util.objects.ParsedIp; import com.seibel.distanthorizons.core.util.LodUtil; @@ -264,7 +264,7 @@ public class ClientOnlySaveStructure extends AbstractSaveStructure // determine the auto folder name format - EServerFolderNameMode folderNameMode = Config.Client.Advanced.Multiplayer.serverFolderNameMode.get(); + EDhApiServerFolderNameMode folderNameMode = Config.Client.Advanced.Multiplayer.serverFolderNameMode.get(); String serverName = MC_CLIENT.getCurrentServerName().replaceAll(INVALID_FILE_CHARACTERS_REGEX, ""); String serverMcVersion = MC_CLIENT.getCurrentServerVersion().replaceAll(INVALID_FILE_CHARACTERS_REGEX, ""); diff --git a/core/src/main/java/com/seibel/distanthorizons/core/level/ClientLevelModule.java b/core/src/main/java/com/seibel/distanthorizons/core/level/ClientLevelModule.java index 6b424652e..31fcd1158 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/level/ClientLevelModule.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/level/ClientLevelModule.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.level; -import com.seibel.distanthorizons.api.enums.rendering.EDebugRendering; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiDebugRendering; import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiRenderParam; import com.seibel.distanthorizons.core.config.Config; import com.seibel.distanthorizons.core.dataObjects.fullData.sources.FullDataSourceV2; @@ -80,7 +80,7 @@ public class ClientLevelModule implements Closeable, AbstractNewDataSourceHandle // tick methods // //==============// - private EDebugRendering lastDebugRendering = EDebugRendering.OFF; + private EDhApiDebugRendering lastDebugRendering = EDhApiDebugRendering.OFF; public void clientTick() { @@ -123,7 +123,7 @@ public class ClientLevelModule implements Closeable, AbstractNewDataSourceHandle clientRenderState.quadtree.tick(new DhBlockPos2D(MC_CLIENT.getPlayerBlockPos())); boolean isBuffersDirty = false; - EDebugRendering newDebugRendering = Config.Client.Advanced.Debugging.debugRendering.get(); + EDhApiDebugRendering newDebugRendering = Config.Client.Advanced.Debugging.debugRendering.get(); if (newDebugRendering != lastDebugRendering) { lastDebugRendering = newDebugRendering; diff --git a/core/src/main/java/com/seibel/distanthorizons/core/logging/ConfigBasedLogger.java b/core/src/main/java/com/seibel/distanthorizons/core/logging/ConfigBasedLogger.java index 9471d77af..798080895 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/logging/ConfigBasedLogger.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/logging/ConfigBasedLogger.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.logging; -import com.seibel.distanthorizons.api.enums.config.ELoggerMode; +import com.seibel.distanthorizons.api.enums.config.EDhApiLoggerMode; import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector; import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper; import org.apache.logging.log4j.Level; @@ -50,11 +50,11 @@ public class ConfigBasedLogger }); } - private ELoggerMode mode; - private final Supplier getter; + private EDhApiLoggerMode mode; + private final Supplier getter; private final Logger logger; - public ConfigBasedLogger(Logger logger, Supplier configQuery) + public ConfigBasedLogger(Logger logger, Supplier configQuery) { getter = configQuery; mode = getter.get(); @@ -85,7 +85,7 @@ public class ConfigBasedLogger public boolean canMaybeLog() { - return mode != ELoggerMode.DISABLED; + return mode != EDhApiLoggerMode.DISABLED; } public void log(Level level, String str, Object... param) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/logging/ConfigBasedSpamLogger.java b/core/src/main/java/com/seibel/distanthorizons/core/logging/ConfigBasedSpamLogger.java index 4c2ba312c..82f9258dc 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/logging/ConfigBasedSpamLogger.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/logging/ConfigBasedSpamLogger.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.logging; -import com.seibel.distanthorizons.api.enums.config.ELoggerMode; +import com.seibel.distanthorizons.api.enums.config.EDhApiLoggerMode; import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector; import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper; import org.apache.logging.log4j.Level; @@ -52,13 +52,13 @@ public class ConfigBasedSpamLogger }); } - private ELoggerMode mode; - private final Supplier getter; + private EDhApiLoggerMode mode; + private final Supplier getter; private final int maxLogCount; private final AtomicInteger logTries = new AtomicInteger(0); private final Logger logger; - public ConfigBasedSpamLogger(Logger logger, Supplier configQuery, int maxLogPerSec) + public ConfigBasedSpamLogger(Logger logger, Supplier configQuery, int maxLogPerSec) { getter = configQuery; mode = getter.get(); @@ -74,7 +74,7 @@ public class ConfigBasedSpamLogger public boolean canMaybeLog() { - return mode != ELoggerMode.DISABLED && logTries.get() < maxLogCount; + return mode != EDhApiLoggerMode.DISABLED && logTries.get() < maxLogCount; } public void update() diff --git a/core/src/main/java/com/seibel/distanthorizons/core/render/LodQuadTree.java b/core/src/main/java/com/seibel/distanthorizons/core/render/LodQuadTree.java index bc9761931..203ceee3d 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/render/LodQuadTree.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/render/LodQuadTree.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.render; -import com.seibel.distanthorizons.api.enums.config.EHorizontalQuality; +import com.seibel.distanthorizons.api.enums.config.EDhApiHorizontalQuality; import com.seibel.distanthorizons.core.config.Config; import com.seibel.distanthorizons.core.config.listeners.ConfigChangeListener; import com.seibel.distanthorizons.core.dataObjects.render.ColumnRenderSource; @@ -67,7 +67,7 @@ public class LodQuadTree extends QuadTree implements AutoClose */ private final ConcurrentLinkedQueue sectionsToReload = new ConcurrentLinkedQueue<>(); private final IDhClientLevel level; //FIXME: Proper hierarchy to remove this reference! - private final ConfigChangeListener horizontalScaleChangeListener; + private final ConfigChangeListener horizontalScaleChangeListener; private final ReentrantLock treeReadWriteLock = new ReentrantLock(); private final AtomicBoolean fullDataRetrievalQueueRunning = new AtomicBoolean(false); @@ -369,7 +369,7 @@ public class LodQuadTree extends QuadTree implements AutoClose private byte getDetailLevelFromDistance(double distance) { // special case, never drop the quality - if (Config.Client.Advanced.Graphics.Quality.horizontalQuality.get() == EHorizontalQuality.UNLIMITED) + if (Config.Client.Advanced.Graphics.Quality.horizontalQuality.get() == EDhApiHorizontalQuality.UNLIMITED) { return this.maxRenderDetailLevel; } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/render/fog/FogSettings.java b/core/src/main/java/com/seibel/distanthorizons/core/render/fog/FogSettings.java index 98fa739ca..12db4070d 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/render/fog/FogSettings.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/render/fog/FogSettings.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.render.fog; -import com.seibel.distanthorizons.api.enums.rendering.EFogFalloff; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogFalloff; import java.util.Objects; @@ -31,7 +31,7 @@ import java.util.Objects; public class FogSettings { /** a FogSetting object with 0 for every value */ - public static final FogSettings EMPTY = new FogSettings(0, 0, 0, 0, 0, EFogFalloff.LINEAR); + public static final FogSettings EMPTY = new FogSettings(0, 0, 0, 0, 0, EDhApiFogFalloff.LINEAR); public final double start; @@ -39,9 +39,9 @@ public class FogSettings public final double min; public final double max; public final double density; - public final EFogFalloff fogType; + public final EDhApiFogFalloff fogType; - public FogSettings(double start, double end, double min, double max, double density, EFogFalloff fogType) + public FogSettings(double start, double end, double min, double max, double density, EDhApiFogFalloff fogType) { this.start = start; this.end = end; diff --git a/core/src/main/java/com/seibel/distanthorizons/core/render/fog/LodFogConfig.java b/core/src/main/java/com/seibel/distanthorizons/core/render/fog/LodFogConfig.java index a67e992fe..5bc86eb2e 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/render/fog/LodFogConfig.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/render/fog/LodFogConfig.java @@ -48,8 +48,8 @@ public class LodFogConfig public final FogSettings farFogSetting; public final FogSettings heightFogSetting; - public final EHeightFogMixMode heightFogMixMode; - public final EHeightFogMode heightFogMode; + public final EDhApiHeightFogMixMode heightFogMixMode; + public final EDhApiHeightFogMode heightFogMode; public final float heightFogHeight; final boolean drawNearFog; @@ -66,8 +66,8 @@ public class LodFogConfig public static LodFogConfig generateFogConfig() { - EFogDrawMode fogMode = Config.Client.Advanced.Graphics.Fog.drawMode.get(); - if (fogMode == EFogDrawMode.USE_OPTIFINE_SETTING && OPTIFINE != null) + EDhApiFogDrawMode fogMode = Config.Client.Advanced.Graphics.Fog.drawMode.get(); + if (fogMode == EDhApiFogDrawMode.USE_OPTIFINE_SETTING && OPTIFINE != null) { fogMode = OPTIFINE.getFogDrawMode(); } @@ -75,7 +75,7 @@ public class LodFogConfig } /** sets all fog options from the config */ - private LodFogConfig(EFogDrawMode fogDrawMode) + private LodFogConfig(EDhApiFogDrawMode fogDrawMode) { // TODO: Move these out of here earthCurveRatio = Config.Client.Advanced.Graphics.AdvancedGraphics.earthCurveRatio.get(); @@ -86,12 +86,12 @@ public class LodFogConfig noiseDropoff = Config.Client.Advanced.Graphics.NoiseTextureSettings.noiseDropoff.get(); - if (fogDrawMode != EFogDrawMode.FOG_DISABLED) + if (fogDrawMode != EDhApiFogDrawMode.FOG_DISABLED) { - EFogDistance fogDistance = Config.Client.Advanced.Graphics.Fog.distance.get(); - drawNearFog = (fogDistance == EFogDistance.NEAR || fogDistance == EFogDistance.NEAR_AND_FAR); + EDhApiFogDistance fogDistance = Config.Client.Advanced.Graphics.Fog.distance.get(); + drawNearFog = (fogDistance == EDhApiFogDistance.NEAR || fogDistance == EDhApiFogDistance.NEAR_AND_FAR); - if (fogDistance == EFogDistance.FAR || fogDistance == EFogDistance.NEAR_AND_FAR) + if (fogDistance == EDhApiFogDistance.FAR || fogDistance == EDhApiFogDistance.NEAR_AND_FAR) { // far fog should be drawn @@ -105,7 +105,7 @@ public class LodFogConfig ); heightFogMixMode = Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogMixMode.get(); - if (heightFogMixMode == EHeightFogMixMode.IGNORE_HEIGHT || heightFogMixMode == EHeightFogMixMode.BASIC) + if (heightFogMixMode == EDhApiHeightFogMixMode.IGNORE_HEIGHT || heightFogMixMode == EDhApiHeightFogMixMode.BASIC) { // basic fog mixing @@ -238,7 +238,7 @@ public class LodFogConfig str.append("" + "float calculateFarFogDepth(float horizontal, float dist, float nearFogStart) \n" + "{ \n" + - " return " + (heightFogMixMode == EHeightFogMixMode.BASIC ? + " return " + (heightFogMixMode == EDhApiHeightFogMixMode.BASIC ? "(dist - nearFogStart)/(1.0 - nearFogStart);" : "(horizontal - nearFogStart)/(1.0 - nearFogStart);") + "} \n"); @@ -286,7 +286,7 @@ public class LodFogConfig return str; } - private static String getFarFogMethod(EFogFalloff fogType) + private static String getFarFogMethod(EDhApiFogFalloff fogType) { switch (fogType) { @@ -302,7 +302,7 @@ public class LodFogConfig } } - private static String getHeightDepthMethod(EHeightFogMode heightMode, float heightFogHeight) + private static String getHeightDepthMethod(EDhApiHeightFogMode heightMode, float heightFogHeight) { String str = ""; if (!heightMode.basedOnCamera) @@ -334,7 +334,7 @@ public class LodFogConfig * Example:
* " return linearFog(dist, heightFogStart, heightFogLength, heightFogMin, heightFogRange);" */ - private static String getHeightFogMethod(EFogFalloff fogType) + private static String getHeightFogMethod(EDhApiFogFalloff fogType) { switch (fogType) { @@ -354,7 +354,7 @@ public class LodFogConfig * creates a line in the format
* " return max(1.0-near, far);" */ - private static String getMixFogLine(EHeightFogMixMode heightFogMode, boolean drawNearFog) + private static String getMixFogLine(EDhApiHeightFogMixMode heightFogMode, boolean drawNearFog) { String str = " return "; diff --git a/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/GLProxy.java b/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/GLProxy.java index b53f782a5..c49f74ce9 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/GLProxy.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/GLProxy.java @@ -20,9 +20,9 @@ package com.seibel.distanthorizons.core.render.glObject; import com.google.common.util.concurrent.ThreadFactoryBuilder; -import com.seibel.distanthorizons.api.enums.config.EGLErrorHandlingMode; -import com.seibel.distanthorizons.api.enums.config.EGlProfileMode; -import com.seibel.distanthorizons.api.enums.config.EGpuUploadMethod; +import com.seibel.distanthorizons.api.enums.config.EDhApiGLErrorHandlingMode; +import com.seibel.distanthorizons.api.enums.config.EDhApiGlProfileMode; +import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod; import com.seibel.distanthorizons.core.config.Config; import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector; import com.seibel.distanthorizons.core.enums.EGLProxyContext; @@ -107,7 +107,7 @@ public class GLProxy public boolean bufferStorageSupported = false; // ~OpenGL 4.4 public boolean VertexAttributeBufferBindingSupported = false; // ~OpenGL 4.3 - private final EGpuUploadMethod preferredUploadMethod; + private final EDhApiGpuUploadMethod preferredUploadMethod; public final GLMessage.Builder vanillaDebugMessageBuilder = GLMessage.Builder.DEFAULT_MESSAGE_BUILDER; public final GLMessage.Builder lodBuilderDebugMessageBuilder = GLMessage.Builder.DEFAULT_MESSAGE_BUILDER; @@ -209,7 +209,7 @@ public class GLProxy GLFW.glfwWindowHint(GLFW.GLFW_OPENGL_FORWARD_COMPAT, forwardCompatEnabled ? GLFW.GLFW_TRUE : GLFW.GLFW_FALSE); int profileModeInt; - EGlProfileMode profileModeEnum = Config.Client.Advanced.Debugging.OpenGl.glProfileMode.get(); + EDhApiGlProfileMode profileModeEnum = Config.Client.Advanced.Debugging.OpenGl.glProfileMode.get(); switch (profileModeEnum) { case CORE: @@ -322,12 +322,12 @@ public class GLProxy if (vendor.contains("NVIDIA") || vendor.contains("GEFORCE")) { // NVIDIA card - this.preferredUploadMethod = this.bufferStorageSupported ? EGpuUploadMethod.BUFFER_STORAGE : EGpuUploadMethod.SUB_DATA; + this.preferredUploadMethod = this.bufferStorageSupported ? EDhApiGpuUploadMethod.BUFFER_STORAGE : EDhApiGpuUploadMethod.SUB_DATA; } else { // AMD or Intel card - this.preferredUploadMethod = this.bufferStorageSupported ? EGpuUploadMethod.BUFFER_STORAGE : EGpuUploadMethod.DATA; + this.preferredUploadMethod = this.bufferStorageSupported ? EDhApiGpuUploadMethod.BUFFER_STORAGE : EDhApiGpuUploadMethod.DATA; } GL_LOGGER.info("GPU Vendor [" + vendor + "], Preferred upload method is [" + this.preferredUploadMethod + "]."); @@ -445,16 +445,16 @@ public class GLProxy return instance; } - public EGpuUploadMethod getGpuUploadMethod() + public EDhApiGpuUploadMethod getGpuUploadMethod() { - EGpuUploadMethod method = Config.Client.Advanced.GpuBuffers.gpuUploadMethod.get(); - if (!this.bufferStorageSupported && method == EGpuUploadMethod.BUFFER_STORAGE) + EDhApiGpuUploadMethod method = Config.Client.Advanced.GpuBuffers.gpuUploadMethod.get(); + if (!this.bufferStorageSupported && method == EDhApiGpuUploadMethod.BUFFER_STORAGE) { // if buffer storage isn't supported // default to DATA since that is the most compatible - method = EGpuUploadMethod.DATA; + method = EDhApiGpuUploadMethod.DATA; } - return method == EGpuUploadMethod.AUTO ? this.preferredUploadMethod : method; + return method == EDhApiGpuUploadMethod.AUTO ? this.preferredUploadMethod : method; } @@ -567,8 +567,8 @@ public class GLProxy private static void logMessage(GLMessage msg) { - EGLErrorHandlingMode errorHandlingMode = Config.Client.Advanced.Debugging.OpenGl.glErrorHandlingMode.get(); - if (errorHandlingMode == EGLErrorHandlingMode.IGNORE) + EDhApiGLErrorHandlingMode errorHandlingMode = Config.Client.Advanced.Debugging.OpenGl.glErrorHandlingMode.get(); + if (errorHandlingMode == EDhApiGLErrorHandlingMode.IGNORE) { return; } @@ -581,7 +581,7 @@ public class GLProxy GL_LOGGER.error("GL ERROR " + msg.id + " from " + msg.source + ": " + msg.message); - if (errorHandlingMode == EGLErrorHandlingMode.LOG_THROW) + if (errorHandlingMode == EDhApiGLErrorHandlingMode.LOG_THROW) { throw new RuntimeException("GL ERROR: " + msg); } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/buffer/GLBuffer.java b/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/buffer/GLBuffer.java index da1d5f942..112a13cd0 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/buffer/GLBuffer.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/buffer/GLBuffer.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.render.glObject.buffer; -import com.seibel.distanthorizons.api.enums.config.EGpuUploadMethod; +import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod; import com.seibel.distanthorizons.core.enums.EGLProxyContext; import com.seibel.distanthorizons.core.logging.DhLoggerBuilder; import com.seibel.distanthorizons.core.render.glObject.GLProxy; @@ -163,7 +163,7 @@ public class GLBuffer implements AutoCloseable * Assumes the GL Context is already bound.
* Will create the VBO if one exist. */ - public void uploadBuffer(ByteBuffer bb, EGpuUploadMethod uploadMethod, int maxExpansionSize, int bufferHint) + public void uploadBuffer(ByteBuffer bb, EDhApiGpuUploadMethod uploadMethod, int maxExpansionSize, int bufferHint) { LodUtil.assertTrue(!uploadMethod.useEarlyMapping, "UploadMethod signal that this should use Mapping instead of uploadBuffer!"); int bbSize = bb.limit() - bb.position(); @@ -242,7 +242,7 @@ public class GLBuffer implements AutoCloseable // buffer mapping // //================// - public ByteBuffer mapBuffer(int targetSize, EGpuUploadMethod uploadMethod, int maxExpensionSize, int bufferHint, int mapFlags) + public ByteBuffer mapBuffer(int targetSize, EDhApiGpuUploadMethod uploadMethod, int maxExpensionSize, int bufferHint, int mapFlags) { LodUtil.assertTrue(targetSize != 0, "MapBuffer targetSize is 0"); LodUtil.assertTrue(uploadMethod.useEarlyMapping, "Upload method must be one that use early mappings in order to call mapBuffer"); @@ -312,7 +312,7 @@ public class GLBuffer implements AutoCloseable * Makes sure the buffer exists and is of the correct format * before uploading. */ - private void createOrChangeBufferTypeForUpload(EGpuUploadMethod uploadMethod) + private void createOrChangeBufferTypeForUpload(EDhApiGpuUploadMethod uploadMethod) { // create/change the buffer type if necessary if (uploadMethod.useBufferStorage != this.bufferStorage) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/buffer/GLVertexBuffer.java b/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/buffer/GLVertexBuffer.java index 23bf21b0f..05fbe1287 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/buffer/GLVertexBuffer.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/buffer/GLVertexBuffer.java @@ -21,11 +21,9 @@ package com.seibel.distanthorizons.core.render.glObject.buffer; import java.nio.ByteBuffer; -import com.seibel.distanthorizons.core.logging.DhLoggerBuilder; -import org.apache.logging.log4j.Logger; import org.lwjgl.opengl.GL32; -import com.seibel.distanthorizons.api.enums.config.EGpuUploadMethod; +import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod; /** * This is a container for a OpenGL @@ -63,7 +61,7 @@ public class GLVertexBuffer extends GLBuffer @Override public int getBufferBindingTarget() { return GL32.GL_ARRAY_BUFFER; } - public void uploadBuffer(ByteBuffer byteBuffer, int vertCount, EGpuUploadMethod uploadMethod, int maxExpensionSize) + public void uploadBuffer(ByteBuffer byteBuffer, int vertCount, EDhApiGpuUploadMethod uploadMethod, int maxExpensionSize) { if (vertCount < 0) { @@ -79,7 +77,7 @@ public class GLVertexBuffer extends GLBuffer this.vertexCount = vertCount; } - public ByteBuffer mapBuffer(int targetSize, EGpuUploadMethod uploadMethod, int maxExpensionSize) + public ByteBuffer mapBuffer(int targetSize, EDhApiGpuUploadMethod uploadMethod, int maxExpensionSize) { return super.mapBuffer(targetSize, uploadMethod, maxExpensionSize, uploadMethod.useBufferStorage ? GL32.GL_MAP_WRITE_BIT : diff --git a/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/buffer/QuadElementBuffer.java b/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/buffer/QuadElementBuffer.java index 900bf4f90..915d70c3d 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/buffer/QuadElementBuffer.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/buffer/QuadElementBuffer.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.render.glObject.buffer; -import com.seibel.distanthorizons.api.enums.config.EGpuUploadMethod; +import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod; import com.seibel.distanthorizons.core.logging.DhLoggerBuilder; import com.seibel.distanthorizons.core.render.glObject.GLEnums; import com.seibel.distanthorizons.core.render.glObject.GLProxy; @@ -160,13 +160,13 @@ public class QuadElementBuffer extends GLElementBuffer { bind(); - super.uploadBuffer(buffer, EGpuUploadMethod.DATA, + super.uploadBuffer(buffer, EDhApiGpuUploadMethod.DATA, indicesCount * GLEnums.getTypeSize(type), GL32.GL_STATIC_DRAW); } else { bind(); - super.uploadBuffer(buffer, EGpuUploadMethod.BUFFER_STORAGE, + super.uploadBuffer(buffer, EDhApiGpuUploadMethod.BUFFER_STORAGE, indicesCount * GLEnums.getTypeSize(type), 0); } } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/DebugRenderer.java b/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/DebugRenderer.java index 92fec9b71..c6fa77bbc 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/DebugRenderer.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/DebugRenderer.java @@ -19,8 +19,8 @@ package com.seibel.distanthorizons.core.render.renderer; -import com.seibel.distanthorizons.api.enums.config.EGpuUploadMethod; -import com.seibel.distanthorizons.api.enums.config.ELoggerMode; +import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod; +import com.seibel.distanthorizons.api.enums.config.EDhApiLoggerMode; import com.seibel.distanthorizons.core.config.Config; import com.seibel.distanthorizons.core.config.types.ConfigEntry; import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector; @@ -56,8 +56,8 @@ public class DebugRenderer { public static DebugRenderer INSTANCE = new DebugRenderer(); - public static final ConfigBasedLogger LOGGER = new ConfigBasedLogger(LogManager.getLogger(TestRenderer.class), () -> ELoggerMode.LOG_ALL_TO_CHAT); - public static final ConfigBasedSpamLogger SPAM_LOGGER = new ConfigBasedSpamLogger(LogManager.getLogger(TestRenderer.class), () -> ELoggerMode.LOG_ALL_TO_CHAT, 1); + public static final ConfigBasedLogger LOGGER = new ConfigBasedLogger(LogManager.getLogger(TestRenderer.class), () -> EDhApiLoggerMode.LOG_ALL_TO_CHAT); + public static final ConfigBasedSpamLogger SPAM_LOGGER = new ConfigBasedSpamLogger(LogManager.getLogger(TestRenderer.class), () -> EDhApiLoggerMode.LOG_ALL_TO_CHAT, 1); private static final IMinecraftRenderWrapper MC_RENDER = SingletonInjector.INSTANCE.get(IMinecraftRenderWrapper.class); @@ -174,7 +174,7 @@ public class DebugRenderer this.boxBuffer = new GLVertexBuffer(false); this.boxBuffer.bind(); - this.boxBuffer.uploadBuffer(buffer, 8, EGpuUploadMethod.DATA, box_vertices.length * Float.BYTES); + this.boxBuffer.uploadBuffer(buffer, 8, EDhApiGpuUploadMethod.DATA, box_vertices.length * Float.BYTES); buffer = ByteBuffer.allocateDirect(box_outline_indices.length * Integer.BYTES); buffer.order(ByteOrder.nativeOrder()); @@ -182,7 +182,7 @@ public class DebugRenderer buffer.rewind(); this.boxOutlineBuffer = new GLElementBuffer(false); - this.boxOutlineBuffer.uploadBuffer(buffer, EGpuUploadMethod.DATA, box_outline_indices.length * Integer.BYTES, GL32.GL_STATIC_DRAW); + this.boxOutlineBuffer.uploadBuffer(buffer, EDhApiGpuUploadMethod.DATA, box_outline_indices.length * Integer.BYTES, GL32.GL_STATIC_DRAW); } public void render(Mat4f transform) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/LodRenderer.java b/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/LodRenderer.java index 6b8d983e8..78de044ef 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/LodRenderer.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/LodRenderer.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.render.renderer; -import com.seibel.distanthorizons.api.enums.rendering.EFogDrawMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogDrawMode; import com.seibel.distanthorizons.api.interfaces.override.rendering.IDhApiFramebuffer; import com.seibel.distanthorizons.api.interfaces.override.rendering.IDhApiShaderProgram; import com.seibel.distanthorizons.api.methods.events.abstractEvents.*; @@ -43,7 +43,7 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftCli import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper; import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IProfilerWrapper; import com.seibel.distanthorizons.core.wrapperInterfaces.misc.ILightMapWrapper; -import com.seibel.distanthorizons.api.enums.rendering.EFogColorMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogColorMode; import com.seibel.distanthorizons.core.render.fog.LodFogConfig; import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.AbstractOptifineAccessor; import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IIrisAccessor; @@ -384,7 +384,7 @@ public class LodRenderer } - if (Config.Client.Advanced.Graphics.Fog.drawMode.get() != EFogDrawMode.FOG_DISABLED) + if (Config.Client.Advanced.Graphics.Fog.drawMode.get() != EDhApiFogDrawMode.FOG_DISABLED) { profiler.popPush("LOD Fog"); @@ -520,7 +520,7 @@ public class LodRenderer GL32.glDepthMask(true); // Apparently the depth mask state is stored in the FBO, so glState fails to restore it... - if (Config.Client.Advanced.Graphics.Fog.drawMode.get() != EFogDrawMode.FOG_DISABLED) + if (Config.Client.Advanced.Graphics.Fog.drawMode.get() != EDhApiFogDrawMode.FOG_DISABLED) { profiler.popPush("LOD Fog"); FogShader.INSTANCE.render(partialTicks); @@ -796,7 +796,7 @@ public class LodRenderer { Color fogColor; - if (Config.Client.Advanced.Graphics.Fog.colorMode.get() == EFogColorMode.USE_SKY_COLOR) + if (Config.Client.Advanced.Graphics.Fog.colorMode.get() == EDhApiFogColorMode.USE_SKY_COLOR) { fogColor = MC_RENDER.getSkyColor(); } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/ScreenQuad.java b/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/ScreenQuad.java index c250d69d3..2f9abd294 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/ScreenQuad.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/ScreenQuad.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.render.renderer; -import com.seibel.distanthorizons.api.enums.config.EGpuUploadMethod; +import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod; import com.seibel.distanthorizons.core.render.glObject.buffer.GLVertexBuffer; import com.seibel.distanthorizons.core.render.glObject.vertexAttribute.AbstractVertexAttribute; import com.seibel.distanthorizons.core.render.glObject.vertexAttribute.VertexPointer; @@ -93,7 +93,7 @@ public class ScreenQuad this.boxBuffer = new GLVertexBuffer(false); this.boxBuffer.bind(); - this.boxBuffer.uploadBuffer(buffer, box_vertices.length, EGpuUploadMethod.DATA, box_vertices.length * Float.BYTES); + this.boxBuffer.uploadBuffer(buffer, box_vertices.length, EDhApiGpuUploadMethod.DATA, box_vertices.length * Float.BYTES); } } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/TestRenderer.java b/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/TestRenderer.java index 2c871f892..5d13b95d5 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/TestRenderer.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/TestRenderer.java @@ -19,8 +19,8 @@ package com.seibel.distanthorizons.core.render.renderer; -import com.seibel.distanthorizons.api.enums.config.EGpuUploadMethod; -import com.seibel.distanthorizons.api.enums.config.ELoggerMode; +import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod; +import com.seibel.distanthorizons.api.enums.config.EDhApiLoggerMode; import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector; import com.seibel.distanthorizons.core.logging.ConfigBasedLogger; import com.seibel.distanthorizons.core.logging.ConfigBasedSpamLogger; @@ -45,9 +45,9 @@ public class TestRenderer public TestRenderer() { } public static final ConfigBasedLogger logger = new ConfigBasedLogger( - LogManager.getLogger(TestRenderer.class), () -> ELoggerMode.LOG_ALL_TO_CHAT); + LogManager.getLogger(TestRenderer.class), () -> EDhApiLoggerMode.LOG_ALL_TO_CHAT); public static final ConfigBasedSpamLogger spamLogger = new ConfigBasedSpamLogger( - LogManager.getLogger(TestRenderer.class), () -> ELoggerMode.LOG_ALL_TO_CHAT, 1); + LogManager.getLogger(TestRenderer.class), () -> EDhApiLoggerMode.LOG_ALL_TO_CHAT, 1); private static final IMinecraftRenderWrapper MC_RENDER = SingletonInjector.INSTANCE.get(IMinecraftRenderWrapper.class); ShaderProgram basicShader; @@ -91,7 +91,7 @@ public class TestRenderer buffer.rewind(); GLVertexBuffer vbo = new GLVertexBuffer(false); vbo.bind(); - vbo.uploadBuffer(buffer, 4, EGpuUploadMethod.DATA, vertices.length * Float.BYTES); + vbo.uploadBuffer(buffer, 4, EDhApiGpuUploadMethod.DATA, vertices.length * Float.BYTES); return vbo; } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/shaders/FogShader.java b/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/shaders/FogShader.java index 2d5a3491c..e5a1fc255 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/shaders/FogShader.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/render/renderer/shaders/FogShader.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.render.renderer.shaders; -import com.seibel.distanthorizons.api.enums.rendering.EFogColorMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogColorMode; import com.seibel.distanthorizons.core.config.Config; import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector; import com.seibel.distanthorizons.core.render.fog.LodFogConfig; @@ -29,7 +29,6 @@ import com.seibel.distanthorizons.core.render.glObject.shader.ShaderProgram; import com.seibel.distanthorizons.core.render.renderer.LodRenderer; import com.seibel.distanthorizons.core.render.renderer.ScreenQuad; import com.seibel.distanthorizons.core.util.LodUtil; -import com.seibel.distanthorizons.core.util.RenderUtil; import com.seibel.distanthorizons.core.wrapperInterfaces.IVersionConstants; import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper; import com.seibel.distanthorizons.coreapi.util.math.Mat4f; @@ -124,7 +123,7 @@ public class FogShader extends AbstractShaderRenderer { Color fogColor; - if (Config.Client.Advanced.Graphics.Fog.colorMode.get() == EFogColorMode.USE_SKY_COLOR) + if (Config.Client.Advanced.Graphics.Fog.colorMode.get() == EDhApiFogColorMode.USE_SKY_COLOR) { fogColor = MC_RENDER.getSkyColor(); } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/util/LodUtil.java b/core/src/main/java/com/seibel/distanthorizons/core/util/LodUtil.java index 28bfdd83e..7b43cf6a8 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/util/LodUtil.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/util/LodUtil.java @@ -24,7 +24,7 @@ import java.util.concurrent.CancellationException; import java.util.concurrent.CompletionException; import java.util.concurrent.RejectedExecutionException; -import com.seibel.distanthorizons.api.enums.config.EVanillaOverdraw; +import com.seibel.distanthorizons.api.enums.config.EDhApiVanillaOverdraw; import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector; import com.seibel.distanthorizons.core.logging.DhLoggerBuilder; import com.seibel.distanthorizons.core.pos.DhChunkPos; @@ -179,10 +179,11 @@ public class LodUtil public static int computeOverdrawOffset() { int chunkRenderDist = MC_RENDER.getRenderDistance() + 1; - EVanillaOverdraw overdraw = EVanillaOverdraw.ALWAYS; //Config.Client.Advanced.Graphics.AdvancedGraphics.vanillaOverdraw.get(); - if (overdraw == EVanillaOverdraw.ALWAYS) return Integer.MAX_VALUE; + EDhApiVanillaOverdraw overdraw = EDhApiVanillaOverdraw.ALWAYS; //Config.Client.Advanced.Graphics.AdvancedGraphics.vanillaOverdraw.get(); + if (overdraw == EDhApiVanillaOverdraw.ALWAYS) return Integer.MAX_VALUE; + int offset; - if (overdraw == EVanillaOverdraw.NEVER) + if (overdraw == EDhApiVanillaOverdraw.NEVER) { offset = 0; //Config.Client.Advanced.Graphics.AdvancedGraphics.overdrawOffset.get(); } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/modAccessor/AbstractOptifineAccessor.java b/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/modAccessor/AbstractOptifineAccessor.java index 29683a624..4355e790b 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/modAccessor/AbstractOptifineAccessor.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/modAccessor/AbstractOptifineAccessor.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor; -import com.seibel.distanthorizons.api.enums.rendering.EFogDrawMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogDrawMode; import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector; import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper; @@ -75,14 +75,14 @@ public abstract class AbstractOptifineAccessor implements IOptifineAccessor //===================// @Override - public EFogDrawMode getFogDrawMode() + public EDhApiFogDrawMode getFogDrawMode() { if (this.ofFogField == null) { // either optifine isn't installed, // the variable name was changed, or // the setup method wasn't called yet. - return EFogDrawMode.FOG_ENABLED; + return EDhApiFogDrawMode.FOG_ENABLED; } int returnNum = 0; @@ -105,9 +105,9 @@ public abstract class AbstractOptifineAccessor implements IOptifineAccessor // normal options case 1: // fast case 2: // fancy - return EFogDrawMode.FOG_ENABLED; + return EDhApiFogDrawMode.FOG_ENABLED; case 3: // off - return EFogDrawMode.FOG_DISABLED; + return EDhApiFogDrawMode.FOG_DISABLED; } } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/modAccessor/IOptifineAccessor.java b/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/modAccessor/IOptifineAccessor.java index 35e6e8dbe..26a46c34a 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/modAccessor/IOptifineAccessor.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/modAccessor/IOptifineAccessor.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor; -import com.seibel.distanthorizons.api.enums.rendering.EFogDrawMode; +import com.seibel.distanthorizons.api.enums.rendering.EDhApiFogDrawMode; import com.seibel.distanthorizons.core.pos.DhChunkPos; import java.util.HashSet; @@ -31,7 +31,7 @@ public interface IOptifineAccessor extends IModAccessor HashSet getNormalRenderedChunks(); /** Get what type of fog optifine is currently set to render. */ - EFogDrawMode getFogDrawMode(); + EDhApiFogDrawMode getFogDrawMode(); /** * Returns the percentage multiplier of the screen's current resolution.
diff --git a/core/src/main/resources/assets/distanthorizons/lang/en_us.json b/core/src/main/resources/assets/distanthorizons/lang/en_us.json index f8d189706..d8f6bdc19 100644 --- a/core/src/main/resources/assets/distanthorizons/lang/en_us.json +++ b/core/src/main/resources/assets/distanthorizons/lang/en_us.json @@ -616,142 +616,142 @@ - "distanthorizons.config.enum.EQualityPreset.CUSTOM": + "distanthorizons.config.enum.EDhApiQualityPreset.CUSTOM": "Custom", - "distanthorizons.config.enum.EQualityPreset.MINIMUM": + "distanthorizons.config.enum.EDhApiQualityPreset.MINIMUM": "Minimum", - "distanthorizons.config.enum.EQualityPreset.LOW": + "distanthorizons.config.enum.EDhApiQualityPreset.LOW": "Low", - "distanthorizons.config.enum.EQualityPreset.MEDIUM": + "distanthorizons.config.enum.EDhApiQualityPreset.MEDIUM": "Medium", - "distanthorizons.config.enum.EQualityPreset.HIGH": + "distanthorizons.config.enum.EDhApiQualityPreset.HIGH": "High", - "distanthorizons.config.enum.EQualityPreset.EXTREME": + "distanthorizons.config.enum.EDhApiQualityPreset.EXTREME": "Extreme", - "distanthorizons.config.enum.EThreadPreset.CUSTOM": + "distanthorizons.config.enum.EDhApiThreadPreset.CUSTOM": "Custom", - "distanthorizons.config.enum.EThreadPreset.MINIMAL_IMPACT": + "distanthorizons.config.enum.EDhApiThreadPreset.MINIMAL_IMPACT": "Minimal Impact", - "distanthorizons.config.enum.EThreadPreset.LOW_IMPACT": + "distanthorizons.config.enum.EDhApiThreadPreset.LOW_IMPACT": "Low Impact", - "distanthorizons.config.enum.EThreadPreset.BALANCED": + "distanthorizons.config.enum.EDhApiThreadPreset.BALANCED": "Balanced", - "distanthorizons.config.enum.EThreadPreset.AGGRESSIVE": + "distanthorizons.config.enum.EDhApiThreadPreset.AGGRESSIVE": "Aggressive", - "distanthorizons.config.enum.EThreadPreset.I_PAID_FOR_THE_WHOLE_CPU": + "distanthorizons.config.enum.EDhApiThreadPreset.I_PAID_FOR_THE_WHOLE_CPU": "I Paid For The Whole CPU", - "distanthorizons.config.enum.EMaxHorizontalResolution.BLOCK": + "distanthorizons.config.enum.EDhApiMaxHorizontalResolution.BLOCK": "Block", - "distanthorizons.config.enum.EMaxHorizontalResolution.TWO_BLOCKS": + "distanthorizons.config.enum.EDhApiMaxHorizontalResolution.TWO_BLOCKS": "2 blocks", - "distanthorizons.config.enum.EMaxHorizontalResolution.FOUR_BLOCKS": + "distanthorizons.config.enum.EDhApiMaxHorizontalResolution.FOUR_BLOCKS": "4 blocks", - "distanthorizons.config.enum.EMaxHorizontalResolution.HALF_CHUNK": + "distanthorizons.config.enum.EDhApiMaxHorizontalResolution.HALF_CHUNK": "Half a chunk", - "distanthorizons.config.enum.EMaxHorizontalResolution.CHUNK": + "distanthorizons.config.enum.EDhApiMaxHorizontalResolution.CHUNK": "Chunk", - "distanthorizons.config.enum.EVerticalQuality.HEIGHT_MAP": + "distanthorizons.config.enum.EDhApiVerticalQuality.HEIGHT_MAP": "1. Height Map", - "distanthorizons.config.enum.EVerticalQuality.LOW": + "distanthorizons.config.enum.EDhApiVerticalQuality.LOW": "2. Low", - "distanthorizons.config.enum.EVerticalQuality.MEDIUM": + "distanthorizons.config.enum.EDhApiVerticalQuality.MEDIUM": "3. Medium", - "distanthorizons.config.enum.EVerticalQuality.HIGH": + "distanthorizons.config.enum.EDhApiVerticalQuality.HIGH": "4. High", - "distanthorizons.config.enum.EVerticalQuality.VERY_HIGH": + "distanthorizons.config.enum.EDhApiVerticalQuality.VERY_HIGH": "5. Very High", - "distanthorizons.config.enum.EVerticalQuality.EXTREME": + "distanthorizons.config.enum.EDhApiVerticalQuality.EXTREME": "6. Extreme", - "distanthorizons.config.enum.EVerticalQuality.PIXEL_ART": + "distanthorizons.config.enum.EDhApiVerticalQuality.PIXEL_ART": "7. Pixel Art", - "distanthorizons.config.enum.EHorizontalQuality.LOWEST": + "distanthorizons.config.enum.EDhApiHorizontalQuality.LOWEST": "Lowest", - "distanthorizons.config.enum.EHorizontalQuality.LOW": + "distanthorizons.config.enum.EDhApiHorizontalQuality.LOW": "Low", - "distanthorizons.config.enum.EHorizontalQuality.MEDIUM": + "distanthorizons.config.enum.EDhApiHorizontalQuality.MEDIUM": "Medium", - "distanthorizons.config.enum.EHorizontalQuality.HIGH": + "distanthorizons.config.enum.EDhApiHorizontalQuality.HIGH": "High", - "distanthorizons.config.enum.EHorizontalQuality.EXTREME": + "distanthorizons.config.enum.EDhApiHorizontalQuality.EXTREME": "Extreme", - "distanthorizons.config.enum.EHorizontalQuality.UNLIMITED": + "distanthorizons.config.enum.EDhApiHorizontalQuality.UNLIMITED": "Unlimited", - "distanthorizons.config.enum.ETransparency.DISABLED": + "distanthorizons.config.enum.EDhApiTransparency.DISABLED": "Disabled", - "distanthorizons.config.enum.ETransparency.FAKE": + "distanthorizons.config.enum.EDhApiTransparency.FAKE": "Fake", - "distanthorizons.config.enum.ETransparency.COMPLETE": + "distanthorizons.config.enum.EDhApiTransparency.COMPLETE": "Complete", - "distanthorizons.config.enum.EFogDistance.NEAR": + "distanthorizons.config.enum.EDhApiFogDistance.NEAR": "Near", - "distanthorizons.config.enum.EFogDistance.FAR": + "distanthorizons.config.enum.EDhApiFogDistance.FAR": "Far", - "distanthorizons.config.enum.EFogDistance.NEAR_AND_FAR": + "distanthorizons.config.enum.EDhApiFogDistance.NEAR_AND_FAR": "Near and far", - "distanthorizons.config.enum.EFogDrawMode.USE_OPTIFINE_SETTING": + "distanthorizons.config.enum.EDhApiFogDrawMode.USE_OPTIFINE_SETTING": "Use modded settings", - "distanthorizons.config.enum.EFogDrawMode.FOG_ENABLED": + "distanthorizons.config.enum.EDhApiFogDrawMode.FOG_ENABLED": "Enabled", - "distanthorizons.config.enum.EFogDrawMode.FOG_DISABLED": + "distanthorizons.config.enum.EDhApiFogDrawMode.FOG_DISABLED": "Disabled", - "distanthorizons.config.enum.EFogColorMode.USE_WORLD_FOG_COLOR": + "distanthorizons.config.enum.EDhApiFogColorMode.USE_WORLD_FOG_COLOR": "Use world fog", - "distanthorizons.config.enum.EFogColorMode.USE_SKY_COLOR": + "distanthorizons.config.enum.EDhApiFogColorMode.USE_SKY_COLOR": "Use sky color", - "distanthorizons.config.enum.EFogFalloff.LINEAR": + "distanthorizons.config.enum.EDhApiFogFalloff.LINEAR": "Linear", - "distanthorizons.config.enum.EFogFalloff.EXPONENTIAL": + "distanthorizons.config.enum.EDhApiFogFalloff.EXPONENTIAL": "Exponential", - "distanthorizons.config.enum.EFogFalloff.EXPONENTIAL_SQUARED": + "distanthorizons.config.enum.EDhApiFogFalloff.EXPONENTIAL_SQUARED": "Exponential squared", - "distanthorizons.config.enum.EHeightFogMixMode.BASIC": + "distanthorizons.config.enum.EDhApiHeightFogMixMode.BASIC": "Basic", - "distanthorizons.config.enum.EHeightFogMixMode.IGNORE_HEIGHT": + "distanthorizons.config.enum.EDhApiHeightFogMixMode.IGNORE_HEIGHT": "Ignore Height", - "distanthorizons.config.enum.EHeightFogMixMode.ADDITION": + "distanthorizons.config.enum.EDhApiHeightFogMixMode.ADDITION": "Addition", - "distanthorizons.config.enum.EHeightFogMixMode.MAX": + "distanthorizons.config.enum.EDhApiHeightFogMixMode.MAX": "Max", - "distanthorizons.config.enum.EHeightFogMixMode.MULTIPLY": + "distanthorizons.config.enum.EDhApiHeightFogMixMode.MULTIPLY": "Multiply", - "distanthorizons.config.enum.EHeightFogMixMode.INVERSE_MULTIPLY": + "distanthorizons.config.enum.EDhApiHeightFogMixMode.INVERSE_MULTIPLY": "Inverse Multiply", - "distanthorizons.config.enum.EHeightFogMixMode.LIMITED_ADDITION": + "distanthorizons.config.enum.EDhApiHeightFogMixMode.LIMITED_ADDITION": "Limited Addition", - "distanthorizons.config.enum.EHeightFogMixMode.MULTIPLY_ADDITION": + "distanthorizons.config.enum.EDhApiHeightFogMixMode.MULTIPLY_ADDITION": "Multiply Addition", - "distanthorizons.config.enum.EHeightFogMixMode.INVERSE_MULTIPLY_ADDITION": + "distanthorizons.config.enum.EDhApiHeightFogMixMode.INVERSE_MULTIPLY_ADDITION": "Inverse Multiply Addition", - "distanthorizons.config.enum.EHeightFogMixMode.AVERAGE": + "distanthorizons.config.enum.EDhApiHeightFogMixMode.AVERAGE": "Average", - "distanthorizons.config.enum.EHeightFogMode.ABOVE_CAMERA": + "distanthorizons.config.enum.EDhApiHeightFogMode.ABOVE_CAMERA": "Above Camera", - "distanthorizons.config.enum.EHeightFogMode.BELOW_CAMERA": + "distanthorizons.config.enum.EDhApiHeightFogMode.BELOW_CAMERA": "Below Camera", - "distanthorizons.config.enum.EHeightFogMode.ABOVE_AND_BELOW_CAMERA": + "distanthorizons.config.enum.EDhApiHeightFogMode.ABOVE_AND_BELOW_CAMERA": "Above And Below Camera", - "distanthorizons.config.enum.EHeightFogMode.ABOVE_SET_HEIGHT": + "distanthorizons.config.enum.EDhApiHeightFogMode.ABOVE_SET_HEIGHT": "Above Set Height", - "distanthorizons.config.enum.EHeightFogMode.BELOW_SET_HEIGHT": + "distanthorizons.config.enum.EDhApiHeightFogMode.BELOW_SET_HEIGHT": "Below Set Height", - "distanthorizons.config.enum.EHeightFogMode.ABOVE_AND_BELOW_SET_HEIGHT": + "distanthorizons.config.enum.EDhApiHeightFogMode.ABOVE_AND_BELOW_SET_HEIGHT": "Above And Below Set Height", - "distanthorizons.config.enum.EVanillaOverdraw.NEVER": + "distanthorizons.config.enum.EDhApiVanillaOverdraw.NEVER": "Never", - "distanthorizons.config.enum.EVanillaOverdraw.DYNAMIC": + "distanthorizons.config.enum.EDhApiVanillaOverdraw.DYNAMIC": "Dynamic", - "distanthorizons.config.enum.EVanillaOverdraw.ALWAYS": + "distanthorizons.config.enum.EDhApiVanillaOverdraw.ALWAYS": "Always", "distanthorizons.config.enum.EDhApiDistantGeneratorMode.NONE": @@ -783,135 +783,135 @@ "distanthorizons.config.enum.EDhApiWorldCompressionMode.VISUALLY_EQUAL": "2. Visually Equal", - "distanthorizons.config.enum.ELightGenerationMode.DISTANT_HORIZONS": + "distanthorizons.config.enum.EDhApiLightGenerationMode.DISTANT_HORIZONS": "Distant Horizons", - "distanthorizons.config.enum.ELightGenerationMode.MINECRAFT": + "distanthorizons.config.enum.EDhApiLightGenerationMode.MINECRAFT": "Minecraft", - "distanthorizons.config.enum.EGenerationPriority.AUTO": + "distanthorizons.config.enum.EDhApiGenerationPriority.AUTO": "Auto", - "distanthorizons.config.enum.EGenerationPriority.NEAR_FIRST": + "distanthorizons.config.enum.EDhApiGenerationPriority.NEAR_FIRST": "Near first", - "distanthorizons.config.enum.EGenerationPriority.BALANCED": + "distanthorizons.config.enum.EDhApiGenerationPriority.BALANCED": "Balanced", - "distanthorizons.config.enum.EGenerationPriority.FAR_FIRST": + "distanthorizons.config.enum.EDhApiGenerationPriority.FAR_FIRST": "Far first", - "distanthorizons.config.enum.EBlocksToAvoid.NONE": + "distanthorizons.config.enum.EDhApiBlocksToAvoid.NONE": "None", - "distanthorizons.config.enum.EBlocksToAvoid.NON_COLLIDING": + "distanthorizons.config.enum.EDhApiBlocksToAvoid.NON_COLLIDING": "Non-Colliding", - "distanthorizons.config.enum.EOverdrawPrevention.NONE": + "distanthorizons.config.enum.EDhApiOverdrawPrevention.NONE": "None", - "distanthorizons.config.enum.EOverdrawPrevention.LIGHT": + "distanthorizons.config.enum.EDhApiOverdrawPrevention.LIGHT": "Light", - "distanthorizons.config.enum.EOverdrawPrevention.MEDIUM": + "distanthorizons.config.enum.EDhApiOverdrawPrevention.MEDIUM": "Medium", - "distanthorizons.config.enum.EOverdrawPrevention.HEAVY": + "distanthorizons.config.enum.EDhApiOverdrawPrevention.HEAVY": "Heavy", - "distanthorizons.config.enum.EServerFolderNameMode.NAME_ONLY": + "distanthorizons.config.enum.EDhApiServerFolderNameMode.NAME_ONLY": "Name Only", - "distanthorizons.config.enum.EServerFolderNameMode.IP_ONLY": + "distanthorizons.config.enum.EDhApiServerFolderNameMode.IP_ONLY": "IP Only", - "distanthorizons.config.enum.EServerFolderNameMode.NAME_IP": + "distanthorizons.config.enum.EDhApiServerFolderNameMode.NAME_IP": "Name and IP", - "distanthorizons.config.enum.EServerFolderNameMode.NAME_IP_PORT": + "distanthorizons.config.enum.EDhApiServerFolderNameMode.NAME_IP_PORT": "Name, IP, Port", - "distanthorizons.config.enum.EServerFolderNameMode.NAME_IP_PORT_MC_VERSION": + "distanthorizons.config.enum.EDhApiServerFolderNameMode.NAME_IP_PORT_MC_VERSION": "Name, IP, Port, MC version", - "distanthorizons.config.enum.ERendererMode.DEFAULT": + "distanthorizons.config.enum.EDhApiRendererMode.DEFAULT": "Default", - "distanthorizons.config.enum.ERendererMode.DEBUG": + "distanthorizons.config.enum.EDhApiRendererMode.DEBUG": "Debug", - "distanthorizons.config.enum.ERendererMode.DISABLED": + "distanthorizons.config.enum.EDhApiRendererMode.DISABLED": "Disabled", - "distanthorizons.config.enum.EDebugRendering.OFF": + "distanthorizons.config.enum.EDhApiDebugRendering.OFF": "Off", - "distanthorizons.config.enum.EDebugRendering.SHOW_DETAIL": + "distanthorizons.config.enum.EDhApiDebugRendering.SHOW_DETAIL": "Show detail", - "distanthorizons.config.enum.EDebugRendering.SHOW_GENMODE": + "distanthorizons.config.enum.EDhApiDebugRendering.SHOW_GENMODE": "Show generation mode", - "distanthorizons.config.enum.EDebugRendering.SHOW_BLOCK_MATERIAL": + "distanthorizons.config.enum.EDhApiDebugRendering.SHOW_BLOCK_MATERIAL": "Show Material", - "distanthorizons.config.enum.EDebugRendering.SHOW_OVERLAPPING_QUADS": + "distanthorizons.config.enum.EDhApiDebugRendering.SHOW_OVERLAPPING_QUADS": "Show overlapping quads", - "distanthorizons.config.enum.EDebugRendering.SHOW_RENDER_SOURCE_FLAG": + "distanthorizons.config.enum.EDhApiDebugRendering.SHOW_RENDER_SOURCE_FLAG": "Show render source flag", - "distanthorizons.config.enum.EGLErrorHandlingMode.IGNORE": + "distanthorizons.config.enum.EDhApiGLErrorHandlingMode.IGNORE": "Ignore", - "distanthorizons.config.enum.EGLErrorHandlingMode.LOG": + "distanthorizons.config.enum.EDhApiGLErrorHandlingMode.LOG": "Log", - "distanthorizons.config.enum.EGLErrorHandlingMode.LOG_THROW": + "distanthorizons.config.enum.EDhApiGLErrorHandlingMode.LOG_THROW": "Log-Throw", - "distanthorizons.config.enum.EGlProfileMode.CORE": + "distanthorizons.config.enum.EDhApiGlProfileMode.CORE": "Core", - "distanthorizons.config.enum.EGlProfileMode.COMPAT": + "distanthorizons.config.enum.EDhApiGlProfileMode.COMPAT": "Compat", - "distanthorizons.config.enum.EGlProfileMode.ANY": + "distanthorizons.config.enum.EDhApiGlProfileMode.ANY": "Any", - "distanthorizons.config.enum.ELoggerMode.DISABLED": + "distanthorizons.config.enum.EDhApiLoggerMode.DISABLED": "Disabled", - "distanthorizons.config.enum.ELoggerMode.LOG_ALL_TO_FILE": + "distanthorizons.config.enum.EDhApiLoggerMode.LOG_ALL_TO_FILE": "File: All, Chat: Off", - "distanthorizons.config.enum.ELoggerMode.LOG_ERROR_TO_CHAT": + "distanthorizons.config.enum.EDhApiLoggerMode.LOG_ERROR_TO_CHAT": "File: All, Chat: Error", - "distanthorizons.config.enum.ELoggerMode.LOG_WARNING_TO_CHAT": + "distanthorizons.config.enum.EDhApiLoggerMode.LOG_WARNING_TO_CHAT": "File: All, Chat: Warning", - "distanthorizons.config.enum.ELoggerMode.LOG_INFO_TO_CHAT": + "distanthorizons.config.enum.EDhApiLoggerMode.LOG_INFO_TO_CHAT": "File: All, Chat: Info", - "distanthorizons.config.enum.ELoggerMode.LOG_DEBUG_TO_CHAT": + "distanthorizons.config.enum.EDhApiLoggerMode.LOG_DEBUG_TO_CHAT": "File: All, Chat: Debug", - "distanthorizons.config.enum.ELoggerMode.LOG_ALL_TO_CHAT": + "distanthorizons.config.enum.EDhApiLoggerMode.LOG_ALL_TO_CHAT": "File: All, Chat: All", - "distanthorizons.config.enum.ELoggerMode.LOG_ERROR_TO_CHAT_AND_FILE": + "distanthorizons.config.enum.EDhApiLoggerMode.LOG_ERROR_TO_CHAT_AND_FILE": "File: Error, Chat: Error", - "distanthorizons.config.enum.ELoggerMode.LOG_WARNING_TO_CHAT_AND_FILE": + "distanthorizons.config.enum.EDhApiLoggerMode.LOG_WARNING_TO_CHAT_AND_FILE": "File: Warning, Chat: Warning", - "distanthorizons.config.enum.ELoggerMode.LOG_INFO_TO_CHAT_AND_FILE": + "distanthorizons.config.enum.EDhApiLoggerMode.LOG_INFO_TO_CHAT_AND_FILE": "File: Info, Chat: Info", - "distanthorizons.config.enum.ELoggerMode.LOG_DEBUG_TO_CHAT_AND_FILE": + "distanthorizons.config.enum.EDhApiLoggerMode.LOG_DEBUG_TO_CHAT_AND_FILE": "File: Debug, Chat: Debug", - "distanthorizons.config.enum.ELoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE": + "distanthorizons.config.enum.EDhApiLoggerMode.LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE": "File: Info, Chat: Warning", - "distanthorizons.config.enum.ELoggerMode.LOG_ERROR_TO_CHAT_AND_INFO_TO_FILE": + "distanthorizons.config.enum.EDhApiLoggerMode.LOG_ERROR_TO_CHAT_AND_INFO_TO_FILE": "File: Info, Chat: Error", - "distanthorizons.config.enum.EGpuUploadMethod.AUTO": + "distanthorizons.config.enum.EDhApiGpuUploadMethod.AUTO": "Auto", - "distanthorizons.config.enum.EGpuUploadMethod.BUFFER_STORAGE": + "distanthorizons.config.enum.EDhApiGpuUploadMethod.BUFFER_STORAGE": "Buffer storage", - "distanthorizons.config.enum.EGpuUploadMethod.SUB_DATA": + "distanthorizons.config.enum.EDhApiGpuUploadMethod.SUB_DATA": "Sub data", - "distanthorizons.config.enum.EGpuUploadMethod.BUFFER_MAPPING": + "distanthorizons.config.enum.EDhApiGpuUploadMethod.BUFFER_MAPPING": "Buffer mapping", - "distanthorizons.config.enum.EGpuUploadMethod.DATA": + "distanthorizons.config.enum.EDhApiGpuUploadMethod.DATA": "Data", - "distanthorizons.config.enum.EBufferRebuildTimes.CONSTANT": + "distanthorizons.config.enum.EDhApiBufferRebuildTimes.CONSTANT": "Constant", - "distanthorizons.config.enum.EBufferRebuildTimes.FREQUENT": + "distanthorizons.config.enum.EDhApiBufferRebuildTimes.FREQUENT": "Frequent", - "distanthorizons.config.enum.EBufferRebuildTimes.NORMAL": + "distanthorizons.config.enum.EDhApiBufferRebuildTimes.NORMAL": "Normal", - "distanthorizons.config.enum.EBufferRebuildTimes.RARE": + "distanthorizons.config.enum.EDhApiBufferRebuildTimes.RARE": "Rare", - "distanthorizons.config.enum.ELodShading.AUTO": + "distanthorizons.config.enum.EDhApiLodShading.AUTO": "Auto", - "distanthorizons.config.enum.ELodShading.ENABLED": + "distanthorizons.config.enum.EDhApiLodShading.ENABLED": "Enabled", - "distanthorizons.config.enum.ELodShading.DISABLED": + "distanthorizons.config.enum.EDhApiLodShading.DISABLED": "Disabled", - "distanthorizons.config.enum.EUpdateBranch.STABLE": + "distanthorizons.config.enum.EDhApiUpdateBranch.STABLE": "Stable", - "distanthorizons.config.enum.EUpdateBranch.NIGHTLY": + "distanthorizons.config.enum.EDhApiUpdateBranch.NIGHTLY": "Nightly" }