From 7a03db2a0cfc573f3e74dc590a08cba155bd03c2 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sun, 14 Feb 2021 17:36:46 -0600 Subject: [PATCH] Remove useless config options --- .../java/com/backsun/lod/util/LodConfig.java | 93 +------------------ .../backsun/lod/util/ReflectionHandler.java | 9 +- 2 files changed, 6 insertions(+), 96 deletions(-) diff --git a/src/main/java/com/backsun/lod/util/LodConfig.java b/src/main/java/com/backsun/lod/util/LodConfig.java index c89e0eb67..3cc12cbcb 100644 --- a/src/main/java/com/backsun/lod/util/LodConfig.java +++ b/src/main/java/com/backsun/lod/util/LodConfig.java @@ -1,7 +1,6 @@ package com.backsun.lod.util; import com.backsun.lod.util.enums.FogDistance; -import com.backsun.lod.util.enums.FogQuality; import net.minecraftforge.common.config.Config; import net.minecraftforge.common.config.ConfigManager; @@ -35,8 +34,8 @@ public class LodConfig @Config.Comment( {"Enable LODs", "If true LODs will be drawn, if false LODs will " - + "still be generated and stored in your world's save folder, " - + "but they won't be rendered."}) + + "not be rendered. However they will " + + "still be generated and stored in your world's save folder."}) public static boolean drawLODs = true; @Config.Comment( @@ -44,17 +43,6 @@ public class LodConfig "What distance should Fog be drawn on the LODs?"}) public static FogDistance fogDistance = FogDistance.NEAR_AND_FAR; - @Config.Comment( - {"Use Optifine Fog Quality Setting", - "Should the LODs use Optifine's fog quality (Fast or Fancy) setting?"}) - public static boolean useOptifineFogQuality = true; - - @Config.Comment( - {"Fog Quality Override", - "This is only used if \"Use Optifine FogQuality\" " - + "is set to false, or if Optifine can't be found."}) - public static FogQuality fogQualityOverride = FogQuality.FANCY; - @Config.Comment( {"Draw Debugging Checkerboard", "If false the LODs will draw with their normal world colors." @@ -65,80 +53,3 @@ public class LodConfig } - -/* -class ExampleConfig -{ - @Config.Comment("This is an example boolean property.") - public static boolean fooBar = false; - - @Config.Comment( - {"This is an example enum property.", - "It will use a GuiConfigEntries.CycleValueEntry in the config GUI."}) - public static EnumExample exampleEnumProperty = EnumExample.VALUE_1; - - @Config.Comment({"This an example Map field.", "It will be converted to a category containing a property for each key-value pair."}) - public static final Map exampleMapField = new HashMap<>(); - - static - { - exampleMapField.put("foobar", 2.0); - exampleMapField.put("foobaz", 100.5); - exampleMapField.put("barbaz", Double.MAX_VALUE); - } - - public static final Client client = new Client(); - - public enum EnumExample { - VALUE_1, - VALUE_2, - VALUE_3, - VALUE_4 - } - - public static class Client { - - @Config.Comment("This is an example int property.") - public int baz = -100; - - @Config.Comment("This is an example enum property in a subcategory " - + "of the main category.") - public EnumExample exampleSubcategoryEnumProperty = EnumExample.VALUE_3; - - @Config.Comment("This is an example enum property that " - + "uses an enum defined in a nested class.") - public EnumExampleNested exampleNestedEnumProperty = EnumExampleNested.NESTED_2; - - - public enum EnumExampleNested { - NESTED_1, - NESTED_2, - NESTED_3, - NESTED_4, - NESTED_5 - } - } - - - - - - @Mod.EventBusSubscriber(modid = Reference.MOD_ID) - private static class EventHandler - { - - - // Inject the new values and save - // to the config file when the - // config has been changed from the GUI. - @SubscribeEvent - public static void onConfigChanged(final ConfigChangedEvent.OnConfigChangedEvent event) { - if (event.getModID().equals(Reference.MOD_ID)) - { - ConfigManager.sync(Reference.MOD_ID, Config.Type.INSTANCE); - } - } - } - -} -*/ diff --git a/src/main/java/com/backsun/lod/util/ReflectionHandler.java b/src/main/java/com/backsun/lod/util/ReflectionHandler.java index 2d5475f8a..992482bc0 100644 --- a/src/main/java/com/backsun/lod/util/ReflectionHandler.java +++ b/src/main/java/com/backsun/lod/util/ReflectionHandler.java @@ -131,13 +131,12 @@ public class ReflectionHandler */ public FogQuality getFogQuality() { - if (!LodConfig.useOptifineFogQuality || ofFogField == null) + if (ofFogField == null) { // either optifine isn't installed, - // the variable name was changed, - // the setup method wasn't called yet, or - // the user wants to use their own quality setting. - return LodConfig.fogQualityOverride; + // the variable name was changed, or + // the setup method wasn't called yet. + return FogQuality.OFF; } int returnNum = 0;