From 9434275e51d19027e1decf92922e056487b67a51 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Tue, 5 Jul 2022 21:23:42 -0500 Subject: [PATCH] Move some comments and improve DhApi Debugging --- .../external/config/client/DhApiBuffers.java | 5 ----- .../config/client/DhApiDebugging.java | 21 +++++++------------ .../config/client/graphics/DhApiGraphics.java | 5 ----- .../client/graphics/DhApiGraphicsFog.java | 5 ----- .../implementation/wrappers/DhApiConfig.java | 4 ++++ 5 files changed, 11 insertions(+), 29 deletions(-) diff --git a/src/main/java/com/seibel/lod/core/api/external/config/client/DhApiBuffers.java b/src/main/java/com/seibel/lod/core/api/external/config/client/DhApiBuffers.java index 7a9f69729..5c627077b 100644 --- a/src/main/java/com/seibel/lod/core/api/external/config/client/DhApiBuffers.java +++ b/src/main/java/com/seibel/lod/core/api/external/config/client/DhApiBuffers.java @@ -36,11 +36,6 @@ import com.seibel.lod.core.enums.config.EGpuUploadMethod; */ public class DhApiBuffers { - // developer note: - // DhApiConfig needs types explicitly defined otherwise Intellij - // won't do type checking and the wrong types can be used. - // For example returning IDhApiConfig when the config should be a Boolean. - /** Defines how geometry data is uploaded to the GPU. */ public static IDhApiConfig getGpuUploadMethodConfig() diff --git a/src/main/java/com/seibel/lod/core/api/external/config/client/DhApiDebugging.java b/src/main/java/com/seibel/lod/core/api/external/config/client/DhApiDebugging.java index 6c028c674..04f45b72a 100644 --- a/src/main/java/com/seibel/lod/core/api/external/config/client/DhApiDebugging.java +++ b/src/main/java/com/seibel/lod/core/api/external/config/client/DhApiDebugging.java @@ -27,27 +27,20 @@ import com.seibel.lod.core.config.Config.Client.Advanced.Debugging; import com.seibel.lod.core.enums.rendering.EDebugMode; /** - * Distant Horizons debug configuration. + * Distant Horizons' debug configuration. * * @author James Seibel - * @version 2022-7-4 + * @version 2022-7-5 */ public class DhApiDebugging { - - /** - * Returns the config related to if/how Distant Horizons - * uses debug rendering. - */ + /** Can be used to debug the standard fake chunk rendering. */ public static IDhApiConfig getDebugRenderModeConfig() - { return new DhApiConfig<>(Debugging.debugMode, new GenericEnumConverter<>(EDebugMode.class, EDhApiDebugMode.class)); } + { return new DhApiConfig(Debugging.debugMode, new GenericEnumConverter<>(EDebugMode.class, EDhApiDebugMode.class)); } - /** - * Returns the config related to if Distant Horizons - * debug keybindings are active or not. - */ - public static IDhApiConfig getEnableDebugKeybindingsConfig() - { return new DhApiConfig<>(Debugging.enableDebugKeybindings); } + /** If enabled debug keybindings can be used. */ + public static IDhApiConfig getEnableDebugKeybindingsConfig() + { return new DhApiConfig(Debugging.enableDebugKeybindings); } } diff --git a/src/main/java/com/seibel/lod/core/api/external/config/client/graphics/DhApiGraphics.java b/src/main/java/com/seibel/lod/core/api/external/config/client/graphics/DhApiGraphics.java index 5142c1962..175ba9317 100644 --- a/src/main/java/com/seibel/lod/core/api/external/config/client/graphics/DhApiGraphics.java +++ b/src/main/java/com/seibel/lod/core/api/external/config/client/graphics/DhApiGraphics.java @@ -40,11 +40,6 @@ import com.seibel.lod.core.config.Config.Client.Graphics.AdvancedGraphics; */ public class DhApiGraphics { - // developer note: - // DhApiConfig needs types explicitly defined otherwise Intellij - // won't do type checking and the wrong types can be used. - // For example returning IDhApiConfig when the config should be a Boolean. - //========================// // basic graphic settings // diff --git a/src/main/java/com/seibel/lod/core/api/external/config/client/graphics/DhApiGraphicsFog.java b/src/main/java/com/seibel/lod/core/api/external/config/client/graphics/DhApiGraphicsFog.java index ae328b514..8c718da00 100644 --- a/src/main/java/com/seibel/lod/core/api/external/config/client/graphics/DhApiGraphicsFog.java +++ b/src/main/java/com/seibel/lod/core/api/external/config/client/graphics/DhApiGraphicsFog.java @@ -38,11 +38,6 @@ import com.seibel.lod.core.config.Config.Client.Graphics.FogQuality; */ public class DhApiGraphicsFog { - // developer note: - // DhApiConfig needs types explicitly defined otherwise Intellij - // won't do type checking and the wrong types can be used. - // For example returning IDhApiConfig when the config should be a Boolean. - //====================// // basic fog settings // diff --git a/src/main/java/com/seibel/lod/core/api/implementation/wrappers/DhApiConfig.java b/src/main/java/com/seibel/lod/core/api/implementation/wrappers/DhApiConfig.java index fb66c368c..d6d279330 100644 --- a/src/main/java/com/seibel/lod/core/api/implementation/wrappers/DhApiConfig.java +++ b/src/main/java/com/seibel/lod/core/api/implementation/wrappers/DhApiConfig.java @@ -8,6 +8,10 @@ import com.seibel.lod.core.config.types.ConfigEntry; /** * A wrapper used to interface with Distant Horizon's Config. * + * When using this object you need to explicitly define the generic types, + * otherwise Intellij won't do any type checking and the wrong types can be used.
+ * For example a method returning IDhApiConfig when the config should be a Boolean. + * * @param * @author James Seibel * @version 2022-6-30