New config finally done
This commit is contained in:
@@ -1,19 +1,48 @@
|
||||
/*
|
||||
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
|
||||
* licensed under the GNU LGPL v3 License.
|
||||
*
|
||||
* Copyright (C) 2020-2022 James Seibel
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.core;
|
||||
|
||||
|
||||
import com.seibel.lod.core.config.*;
|
||||
import com.seibel.lod.core.config.types.ConfigCategory;
|
||||
import com.seibel.lod.core.config.types.ConfigEntry;
|
||||
import com.seibel.lod.core.config.types.*;
|
||||
|
||||
import com.seibel.lod.core.enums.config.*;
|
||||
import com.seibel.lod.core.enums.rendering.*;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton;
|
||||
|
||||
import java.util.HashMap;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IAdvanced.*;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IGraphics.*;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IGraphics.IFogQuality.IAdvancedFog;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IGraphics.IFogQuality.IAdvancedFog.IHeightFog;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IMultiplayer;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IWorldGenerator;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IAdvanced;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IAdvanced.IDebugging.*;
|
||||
|
||||
|
||||
/**
|
||||
* This handles any configuration the user has access to.
|
||||
* @author coolGi2007
|
||||
* @version 02-07-2022
|
||||
* @version 04-29-2022
|
||||
*/
|
||||
|
||||
public class Config
|
||||
{
|
||||
// CONFIG STRUCTURE
|
||||
@@ -31,26 +60,26 @@ public class Config
|
||||
// |-> Buffers
|
||||
// |-> Debugging
|
||||
|
||||
// Since the original config system uses forge stuff, that means we have to rewrite the whole config system
|
||||
|
||||
public static ConfigCategory client = new ConfigCategory.Builder().set(Client.class).build();
|
||||
|
||||
|
||||
public static class Client
|
||||
{
|
||||
public static ConfigCategory graphics = new ConfigCategory.Builder().set(Graphics.class).build();
|
||||
|
||||
public static ConfigCategory worldGenerator = new ConfigCategory.Builder().set(WorldGenerator.class).build();
|
||||
|
||||
public static ConfigCategory advanced = new ConfigCategory.Builder().set(Advanced.class).build();
|
||||
public static ConfigCategory multiplayer = new ConfigCategory.Builder().set(Multiplayer.class).build();
|
||||
|
||||
public static ConfigCategory advanced = new ConfigCategory.Builder().set(Advanced.class).build();
|
||||
|
||||
public static ConfigEntry<Boolean> optionsButton = new ConfigEntry.Builder<Boolean>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.OPTIONS_BUTTON_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.OPTIONS_BUTTON_DEFAULT)
|
||||
.build();
|
||||
|
||||
// public static ConfigEntry<HashMap<String, Boolean>> testMultiOption = new ConfigEntry.Builder<HashMap<String, Boolean>>()
|
||||
// .set(new HashMap<>() {{put("overworld", true); put("nether", false);}})
|
||||
// .build();
|
||||
|
||||
|
||||
public static class Graphics
|
||||
{
|
||||
@@ -63,36 +92,39 @@ public class Config
|
||||
|
||||
public static class Quality
|
||||
{
|
||||
public static ConfigEntry<HorizontalResolution> drawResolution = new ConfigEntry.Builder<HorizontalResolution>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.DRAW_RESOLUTION_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.DRAW_RESOLUTION_DEFAULT)
|
||||
public static ConfigEntry<HorizontalResolution> drawResolution = new ConfigEntry.Builder<HorizontalResolution>()
|
||||
.comment(IQuality.DRAW_RESOLUTION_DESC)
|
||||
.set(IQuality.DRAW_RESOLUTION_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Integer> lodChunkRenderDistance = new ConfigEntry.Builder<Integer>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.LOD_CHUNK_RENDER_DISTANCE_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.LOD_CHUNK_RENDER_DISTANCE_MIN_DEFAULT_MAX.defaultValue)
|
||||
.setMinMax(ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.LOD_CHUNK_RENDER_DISTANCE_MIN_DEFAULT_MAX.minValue, ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.LOD_CHUNK_RENDER_DISTANCE_MIN_DEFAULT_MAX.maxValue)
|
||||
.comment(IQuality.LOD_CHUNK_RENDER_DISTANCE_DESC)
|
||||
.setMinDefaultMax(IQuality.LOD_CHUNK_RENDER_DISTANCE_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<VerticalQuality> verticalQuality = new ConfigEntry.Builder<VerticalQuality>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.VERTICAL_QUALITY_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.VERTICAL_QUALITY_DEFAULT)
|
||||
.comment(IQuality.VERTICAL_QUALITY_DESC)
|
||||
.set(IQuality.VERTICAL_QUALITY_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Integer> horizontalScale = new ConfigEntry.Builder<Integer>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.HORIZONTAL_SCALE_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.HORIZONTAL_SCALE_MIN_DEFAULT_MAX.defaultValue)
|
||||
.setMinMax(ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.HORIZONTAL_SCALE_MIN_DEFAULT_MAX.minValue, ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.HORIZONTAL_SCALE_MIN_DEFAULT_MAX.maxValue)
|
||||
.comment(IQuality.HORIZONTAL_SCALE_DESC)
|
||||
.setMinDefaultMax(IQuality.HORIZONTAL_SCALE_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<HorizontalQuality> horizontalQuality = new ConfigEntry.Builder<HorizontalQuality>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.HORIZONTAL_SCALE_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.HORIZONTAL_QUALITY_DEFAULT)
|
||||
.comment(IQuality.HORIZONTAL_SCALE_DESC)
|
||||
.set(IQuality.HORIZONTAL_QUALITY_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<DropoffQuality> dropoffQuality = new ConfigEntry.Builder<DropoffQuality>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.DROPOFF_QUALITY_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IGraphics.IQuality.DROPOFF_QUALITY_DEFAULT)
|
||||
.comment(IQuality.DROPOFF_QUALITY_DESC)
|
||||
.set(IQuality.DROPOFF_QUALITY_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Integer> lodBiomeBlending = new ConfigEntry.Builder<Integer>()
|
||||
.comment(IQuality.LOD_BIOME_BLENDING_DESC)
|
||||
.setMinDefaultMax(IQuality.LOD_BIOME_BLENDING_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -100,45 +132,163 @@ public class Config
|
||||
public static class FogQuality
|
||||
{
|
||||
public static ConfigEntry<FogDistance> fogDistance = new ConfigEntry.Builder<FogDistance>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IGraphics.IFogQuality.FOG_DISTANCE_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IGraphics.IFogQuality.FOG_DISTANCE_DEFAULT)
|
||||
.comment(IFogQuality.FOG_DISTANCE_DESC)
|
||||
.set(IFogQuality.FOG_DISTANCE_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<FogDrawMode> fogDrawMode = new ConfigEntry.Builder<FogDrawMode>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IGraphics.IFogQuality.FOG_DRAW_MODE_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IGraphics.IFogQuality.FOG_DRAW_MODE_DEFAULT)
|
||||
.comment(IFogQuality.FOG_DRAW_MODE_DESC)
|
||||
.set(IFogQuality.FOG_DRAW_MODE_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<FogColorMode> fogColorMode = new ConfigEntry.Builder<FogColorMode>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IGraphics.IFogQuality.FOG_COLOR_MODE_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IGraphics.IFogQuality.FOG_COLOR_MODE_DEFAULT)
|
||||
.comment(IFogQuality.FOG_COLOR_MODE_DESC)
|
||||
.set(IFogQuality.FOG_COLOR_MODE_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Boolean> disableVanillaFog = new ConfigEntry.Builder<Boolean>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IGraphics.IFogQuality.DISABLE_VANILLA_FOG_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IGraphics.IFogQuality.DISABLE_VANILLA_FOG_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigCategory advancedFog = new ConfigCategory.Builder().set(AdvancedFog.class).build();
|
||||
|
||||
|
||||
public static class AdvancedFog {
|
||||
public static ConfigEntry<Double> farFogStart = new ConfigEntry.Builder<Double>()
|
||||
.comment(IAdvancedFog.FAR_FOG_START_DESC)
|
||||
.setMinDefaultMax(IAdvancedFog.FAR_FOG_START_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Double> farFogEnd = new ConfigEntry.Builder<Double>()
|
||||
.comment(IAdvancedFog.FAR_FOG_END_DESC)
|
||||
.setMinDefaultMax(IAdvancedFog.FAR_FOG_END_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Double> farFogMin = new ConfigEntry.Builder<Double>()
|
||||
.comment(IAdvancedFog.FAR_FOG_MIN_DESC)
|
||||
.setMinDefaultMax(IAdvancedFog.FAR_FOG_MIN_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Double> farFogMax = new ConfigEntry.Builder<Double>()
|
||||
.comment(IAdvancedFog.FAR_FOG_MAX_DESC)
|
||||
.setMinDefaultMax(IAdvancedFog.FAR_FOG_MAX_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<FogSetting.FogType> farFogType = new ConfigEntry.Builder<FogSetting.FogType>()
|
||||
.comment(IAdvancedFog.FAR_FOG_TYPE_DESC)
|
||||
.set(IAdvancedFog.FAR_FOG_TYPE_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Double> farFogDensity = new ConfigEntry.Builder<Double>()
|
||||
.comment(IAdvancedFog.FAR_FOG_DENSITY_DESC)
|
||||
.setMinDefaultMax(IAdvancedFog.FAR_FOG_DENSITY_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
public static ConfigCategory heightFog = new ConfigCategory.Builder().set(HeightFog.class).build();
|
||||
|
||||
|
||||
public static class HeightFog {
|
||||
public static ConfigEntry<HeightFogMixMode> heightFogMixMode = new ConfigEntry.Builder<HeightFogMixMode>()
|
||||
.comment(IHeightFog.HEIGHT_FOG_MIX_MODE_DESC)
|
||||
.set(IHeightFog.HEIGHT_FOG_MIX_MODE_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<HeightFogMode> heightFogMode = new ConfigEntry.Builder<HeightFogMode>()
|
||||
.comment(IHeightFog.HEIGHT_FOG_MODE_DESC)
|
||||
.set(IHeightFog.HEIGHT_FOG_MODE_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Double> heightFogHeight = new ConfigEntry.Builder<Double>()
|
||||
.comment(IHeightFog.HEIGHT_FOG_HEIGHT_DESC)
|
||||
.setMinDefaultMax(IHeightFog.HEIGHT_FOG_HEIGHT_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Double> heightFogStart = new ConfigEntry.Builder<Double>()
|
||||
.comment(IHeightFog.HEIGHT_FOG_START_DESC)
|
||||
.setMinDefaultMax(IHeightFog.HEIGHT_FOG_START_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Double> heightFogEnd = new ConfigEntry.Builder<Double>()
|
||||
.comment(IHeightFog.HEIGHT_FOG_END_DESC)
|
||||
.setMinDefaultMax(IHeightFog.HEIGHT_FOG_END_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Double> heightFogMin = new ConfigEntry.Builder<Double>()
|
||||
.comment(IHeightFog.HEIGHT_FOG_MIN_DESC)
|
||||
.setMinDefaultMax(IHeightFog.HEIGHT_FOG_MIN_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Double> heightFogMax = new ConfigEntry.Builder<Double>()
|
||||
.comment(IHeightFog.HEIGHT_FOG_MAX_DESC)
|
||||
.setMinDefaultMax(IHeightFog.HEIGHT_FOG_MAX_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<FogSetting.FogType> heightFogType = new ConfigEntry.Builder<FogSetting.FogType>()
|
||||
.comment(IHeightFog.HEIGHT_FOG_TYPE_DESC)
|
||||
.set(IHeightFog.HEIGHT_FOG_TYPE_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Double> heightFogDensity = new ConfigEntry.Builder<Double>()
|
||||
.comment(IHeightFog.HEIGHT_FOG_DENSITY_DESC)
|
||||
.setMinDefaultMax(IHeightFog.HEIGHT_FOG_DENSITY_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class AdvancedGraphics
|
||||
{
|
||||
public static ConfigEntry<Boolean> disableDirectionalCulling = new ConfigEntry.Builder<Boolean>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IGraphics.IAdvancedGraphics.DISABLE_DIRECTIONAL_CULLING_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IGraphics.IAdvancedGraphics.DISABLE_DIRECTIONAL_CULLING_DEFAULT)
|
||||
.comment(IAdvancedGraphics.DISABLE_DIRECTIONAL_CULLING_DESC)
|
||||
.set(IAdvancedGraphics.DISABLE_DIRECTIONAL_CULLING_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<VanillaOverdraw> vanillaOverdraw = new ConfigEntry.Builder<VanillaOverdraw>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IGraphics.IAdvancedGraphics.VANILLA_OVERDRAW_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IGraphics.IAdvancedGraphics.VANILLA_OVERDRAW_DEFAULT)
|
||||
.comment(IAdvancedGraphics.VANILLA_OVERDRAW_DESC)
|
||||
.set(IAdvancedGraphics.VANILLA_OVERDRAW_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Integer> overdrawOffset = new ConfigEntry.Builder<Integer>()
|
||||
.comment(IAdvancedGraphics.OVERDRAW_OFFSET_DESC)
|
||||
.setMinDefaultMax(IAdvancedGraphics.OVERDRAW_OFFSET_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Boolean> useExtendedNearClipPlane = new ConfigEntry.Builder<Boolean>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IGraphics.IAdvancedGraphics.USE_EXTENDED_NEAR_CLIP_PLANE_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IGraphics.IAdvancedGraphics.USE_EXTENDED_NEAR_CLIP_PLANE_DEFAULT)
|
||||
.comment(IAdvancedGraphics.USE_EXTENDED_NEAR_CLIP_PLANE_DESC)
|
||||
.set(IAdvancedGraphics.USE_EXTENDED_NEAR_CLIP_PLANE_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Double> brightnessMultiplier = new ConfigEntry.Builder<Double>()
|
||||
.comment(IAdvancedGraphics.BRIGHTNESS_MULTIPLIER_DESC)
|
||||
.set(IAdvancedGraphics.BRIGHTNESS_MULTIPLIER_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Double> saturationMultiplier = new ConfigEntry.Builder<Double>()
|
||||
.comment(IAdvancedGraphics.SATURATION_MULTIPLIER_DESC)
|
||||
.set(IAdvancedGraphics.SATURATION_MULTIPLIER_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Boolean> enableCaveCulling = new ConfigEntry.Builder<Boolean>()
|
||||
.comment(IAdvancedGraphics.ENABLE_CAVE_CULLING_DESC)
|
||||
.set(IAdvancedGraphics.ENABLE_CAVE_CULLING_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Integer> caveCullingHeight = new ConfigEntry.Builder<Integer>()
|
||||
.comment(IAdvancedGraphics.CAVE_CULLING_HEIGHT_DESC)
|
||||
.setMinDefaultMax(IAdvancedGraphics.CAVE_CULLING_HEIGHT_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Integer> earthCurveRatio = new ConfigEntry.Builder<Integer>()
|
||||
.comment(IAdvancedGraphics.EARTH_CURVE_RATIO_DESC)
|
||||
.setMinDefaultMax(IAdvancedGraphics.EARTH_CURVE_RATIO_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
/*
|
||||
@ConfigAnnotations.FileComment
|
||||
public static String _backsideCullingRange = IAdvancedGraphics.VANILLA_CULLING_RANGE_DESC;
|
||||
@ConfigAnnotations.Entry(minValue = 0, maxValue = 512)
|
||||
public static int backsideCullingRange = IAdvancedGraphics.VANILLA_CULLING_RANGE_MIN_DEFAULT_MAX.defaultValue;
|
||||
*/
|
||||
@@ -149,31 +299,47 @@ public class Config
|
||||
public static class WorldGenerator
|
||||
{
|
||||
public static ConfigEntry<Boolean> enableDistantGeneration = new ConfigEntry.Builder<Boolean>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IWorldGenerator.ENABLE_DISTANT_GENERATION_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IWorldGenerator.ENABLE_DISTANT_GENERATION_DEFAULT)
|
||||
.comment(IWorldGenerator.ENABLE_DISTANT_GENERATION_DESC)
|
||||
.set(IWorldGenerator.ENABLE_DISTANT_GENERATION_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<DistanceGenerationMode> distanceGenerationMode = new ConfigEntry.Builder<DistanceGenerationMode>()
|
||||
//.comment(ILodConfigWrapperSingleton.IClient.IWorldGenerator.getDistanceGenerationModeDesc())
|
||||
.set(ILodConfigWrapperSingleton.IClient.IWorldGenerator.DISTANCE_GENERATION_MODE_DEFAULT)
|
||||
// .comment(IWorldGenerator.getDistanceGenerationModeDesc())
|
||||
.set(IWorldGenerator.DISTANCE_GENERATION_MODE_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<LightGenerationMode> lightGenerationMode = new ConfigEntry.Builder<LightGenerationMode>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IWorldGenerator.LIGHT_GENERATION_MODE_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IWorldGenerator.LIGHT_GENERATION_MODE_DEFAULT)
|
||||
.comment(IWorldGenerator.LIGHT_GENERATION_MODE_DESC)
|
||||
.set(IWorldGenerator.LIGHT_GENERATION_MODE_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<GenerationPriority> generationPriority = new ConfigEntry.Builder<GenerationPriority>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IWorldGenerator.GENERATION_PRIORITY_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IWorldGenerator.GENERATION_PRIORITY_DEFAULT)
|
||||
.comment(IWorldGenerator.GENERATION_PRIORITY_DESC)
|
||||
.set(IWorldGenerator.GENERATION_PRIORITY_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<BlocksToAvoid> blocksToAvoid = new ConfigEntry.Builder<BlocksToAvoid>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IWorldGenerator.BLOCKS_TO_AVOID_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IWorldGenerator.BLOCKS_TO_AVOID_DEFAULT)
|
||||
.comment(IWorldGenerator.BLOCKS_TO_AVOID_DESC)
|
||||
.set(IWorldGenerator.BLOCKS_TO_AVOID_DEFAULT)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
public static class Multiplayer
|
||||
{
|
||||
public static ConfigEntry<ServerFolderNameMode> serverFolderNameMode = new ConfigEntry.Builder<ServerFolderNameMode>()
|
||||
.comment(IMultiplayer.SERVER_FOLDER_NAME_MODE_DESC)
|
||||
.set(IMultiplayer.SERVER_FOLDER_NAME_MODE_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Double> multiDimensionRequiredSimilarity = new ConfigEntry.Builder<Double>()
|
||||
.comment(IMultiplayer.MULTI_DIMENSION_REQUIRED_SIMILARITY_DESC)
|
||||
.setMinDefaultMax(IMultiplayer.MULTI_DIMENSION_REQUIRED_SIMILARITY_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static class Advanced
|
||||
{
|
||||
public static ConfigCategory threading = new ConfigCategory.Builder().set(Threading.class).build();
|
||||
@@ -182,58 +348,121 @@ public class Config
|
||||
|
||||
public static ConfigCategory buffers = new ConfigCategory.Builder().set(Buffers.class).build();
|
||||
|
||||
public static ConfigEntry<Boolean> lodOnlyMode = new ConfigEntry.Builder<Boolean>()
|
||||
.comment(IAdvanced.LOD_ONLY_MODE_DESC)
|
||||
.set(IAdvanced.LOD_ONLY_MODE_DEFAULT)
|
||||
.build();
|
||||
|
||||
|
||||
public static class Threading
|
||||
{
|
||||
public static ConfigEntry<Integer> numberOfWorldGenerationThreads = new ConfigEntry.Builder<Integer>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IAdvanced.IThreading.NUMBER_OF_WORLD_GENERATION_THREADS_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IAdvanced.IThreading.NUMBER_OF_WORLD_GENERATION_THREADS_DEFAULT.defaultValue)
|
||||
.setMinMax(ILodConfigWrapperSingleton.IClient.IAdvanced.IThreading.NUMBER_OF_WORLD_GENERATION_THREADS_DEFAULT.minValue, ILodConfigWrapperSingleton.IClient.IAdvanced.IThreading.NUMBER_OF_WORLD_GENERATION_THREADS_DEFAULT.maxValue)
|
||||
public static ConfigEntry<Double> numberOfWorldGenerationThreads = new ConfigEntry.Builder<Double>()
|
||||
.comment(IThreading.NUMBER_OF_WORLD_GENERATION_THREADS_DESC)
|
||||
.setMinDefaultMax(IThreading.NUMBER_OF_WORLD_GENERATION_THREADS_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Integer> numberOfBufferBuilderThreads = new ConfigEntry.Builder<Integer>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IAdvanced.IThreading.NUMBER_OF_BUFFER_BUILDER_THREADS_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IAdvanced.IThreading.NUMBER_OF_BUFFER_BUILDER_THREADS_MIN_DEFAULT_MAX.defaultValue)
|
||||
.setMinMax(ILodConfigWrapperSingleton.IClient.IAdvanced.IThreading.NUMBER_OF_BUFFER_BUILDER_THREADS_MIN_DEFAULT_MAX.minValue, ILodConfigWrapperSingleton.IClient.IAdvanced.IThreading.NUMBER_OF_BUFFER_BUILDER_THREADS_MIN_DEFAULT_MAX.maxValue)
|
||||
.comment(IThreading.NUMBER_OF_BUFFER_BUILDER_THREADS_DESC)
|
||||
.setMinDefaultMax(IThreading.NUMBER_OF_BUFFER_BUILDER_THREADS_MIN_DEFAULT_MAX)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
public static class Debugging
|
||||
{
|
||||
public static ConfigEntry<Boolean> drawLods = new ConfigEntry.Builder<Boolean>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IAdvanced.IDebugging.DRAW_LODS_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IAdvanced.IDebugging.DRAW_LODS_DEFAULT)
|
||||
public static ConfigEntry<RendererType> rendererType = new ConfigEntry.Builder<RendererType>()
|
||||
.comment(IDebugging.RENDERER_TYPE_DESC)
|
||||
.set(IDebugging.RENDERER_TYPE_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<DebugMode> debugMode = new ConfigEntry.Builder<DebugMode>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IAdvanced.IDebugging.DEBUG_MODE_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IAdvanced.IDebugging.DEBUG_MODE_DEFAULT)
|
||||
.comment(IDebugging.DEBUG_MODE_DESC)
|
||||
.set(IDebugging.DEBUG_MODE_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Boolean> enableDebugKeybindings = new ConfigEntry.Builder<Boolean>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IAdvanced.IDebugging.DEBUG_KEYBINDINGS_ENABLED_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IAdvanced.IDebugging.DEBUG_KEYBINDINGS_ENABLED_DEFAULT)
|
||||
.comment(IDebugging.DEBUG_KEYBINDINGS_ENABLED_DESC)
|
||||
.set(IDebugging.DEBUG_KEYBINDINGS_ENABLED_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigCategory debugSwitch = new ConfigCategory.Builder().set(DebugSwitch.class).build();
|
||||
|
||||
|
||||
public static class DebugSwitch {
|
||||
/* The logging switches available:
|
||||
* WorldGenEvent
|
||||
* WorldGenPerformance
|
||||
* WorldGenLoadEvent
|
||||
* LodBuilderEvent
|
||||
* RendererBufferEvent
|
||||
* RendererGLEvent
|
||||
* FileReadWriteEvent
|
||||
* FileSubDimEvent
|
||||
* NetworkEvent //NOT IMPL YET
|
||||
*/
|
||||
public static ConfigEntry<LoggerMode> logWorldGenEvent = new ConfigEntry.Builder<LoggerMode>()
|
||||
.comment(IDebugSwitch.LOG_WORLDGEN_EVENT_DESC)
|
||||
.set(IDebugSwitch.LOG_WORLDGEN_EVENT_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<LoggerMode> logWorldGenPerformance = new ConfigEntry.Builder<LoggerMode>()
|
||||
.comment(IDebugSwitch.LOG_WORLDGEN_PERFORMANCE_DESC)
|
||||
.set(IDebugSwitch.LOG_WORLDGEN_PERFORMANCE_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<LoggerMode> logWorldGenLoadEvent = new ConfigEntry.Builder<LoggerMode>()
|
||||
.comment(IDebugSwitch.LOG_WORLDGEN_LOAD_EVENT_DESC)
|
||||
.set(IDebugSwitch.LOG_WORLDGEN_LOAD_EVENT_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<LoggerMode> logLodBuilderEvent = new ConfigEntry.Builder<LoggerMode>()
|
||||
.comment(IDebugSwitch.LOG_LODBUILDER_EVENT_DESC)
|
||||
.set(IDebugSwitch.LOG_LODBUILDER_EVENT_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<LoggerMode> logRendererBufferEvent = new ConfigEntry.Builder<LoggerMode>()
|
||||
.comment(IDebugSwitch.LOG_RENDERER_BUFFER_EVENT_DESC)
|
||||
.set(IDebugSwitch.LOG_RENDERER_BUFFER_EVENT_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<LoggerMode> logRendererGLEvent = new ConfigEntry.Builder<LoggerMode>()
|
||||
.comment(IDebugSwitch.LOG_RENDERER_GL_EVENT_DESC)
|
||||
.set(IDebugSwitch.LOG_RENDERER_GL_EVENT_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<LoggerMode> logFileReadWriteEvent = new ConfigEntry.Builder<LoggerMode>()
|
||||
.comment(IDebugSwitch.LOG_FILE_READWRITE_EVENT_DESC)
|
||||
.set(IDebugSwitch.LOG_FILE_READWRITE_EVENT_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<LoggerMode> logFileSubDimEvent = new ConfigEntry.Builder<LoggerMode>()
|
||||
.comment(IDebugSwitch.LOG_FILE_SUB_DIM_EVENT_DESC)
|
||||
.set(IDebugSwitch.LOG_FILE_SUB_DIM_EVENT_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<LoggerMode> logNetworkEvent = new ConfigEntry.Builder<LoggerMode>()
|
||||
.comment(IDebugSwitch.LOG_NETWORK_EVENT_DESC)
|
||||
.set(IDebugSwitch.LOG_NETWORK_EVENT_DEFAULT)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class Buffers
|
||||
{
|
||||
public static ConfigEntry<GpuUploadMethod> gpuUploadMethod = new ConfigEntry.Builder<GpuUploadMethod>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IAdvanced.IBuffers.GPU_UPLOAD_METHOD_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IAdvanced.IBuffers.GPU_UPLOAD_METHOD_DEFAULT)
|
||||
.comment(IBuffers.GPU_UPLOAD_METHOD_DESC)
|
||||
.set(IBuffers.GPU_UPLOAD_METHOD_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Integer> gpuUploadPerMegabyteInMilliseconds = new ConfigEntry.Builder<Integer>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IAdvanced.IBuffers.GPU_UPLOAD_PER_MEGABYTE_IN_MILLISECONDS_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IAdvanced.IBuffers.GPU_UPLOAD_PER_MEGABYTE_IN_MILLISECONDS_DEFAULT.defaultValue)
|
||||
.setMinMax(ILodConfigWrapperSingleton.IClient.IAdvanced.IBuffers.GPU_UPLOAD_PER_MEGABYTE_IN_MILLISECONDS_DEFAULT.minValue, ILodConfigWrapperSingleton.IClient.IAdvanced.IBuffers.GPU_UPLOAD_PER_MEGABYTE_IN_MILLISECONDS_DEFAULT.maxValue)
|
||||
.comment(IBuffers.GPU_UPLOAD_PER_MEGABYTE_IN_MILLISECONDS_DESC)
|
||||
.setMinDefaultMax(IBuffers.GPU_UPLOAD_PER_MEGABYTE_IN_MILLISECONDS_DEFAULT)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<BufferRebuildTimes> rebuildTimes = new ConfigEntry.Builder<BufferRebuildTimes>()
|
||||
.comment(ILodConfigWrapperSingleton.IClient.IAdvanced.IBuffers.REBUILD_TIMES_DESC)
|
||||
.set(ILodConfigWrapperSingleton.IClient.IAdvanced.IBuffers.REBUILD_TIMES_DEFAULT)
|
||||
.comment(IBuffers.REBUILD_TIMES_DESC)
|
||||
.set(IBuffers.REBUILD_TIMES_DEFAULT)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.Locale;
|
||||
* know where to start.
|
||||
* Go to the api/lod package (folder) and take a look at the ClientApi.java file,
|
||||
* Pretty much all of the mod stems from there.
|
||||
*
|
||||
*
|
||||
* @author James Seibel
|
||||
* @author Ran
|
||||
* @version 2022-4-27
|
||||
@@ -40,16 +40,16 @@ public final class ModInfo
|
||||
public static final int PROTOCOL_VERSION = 1;
|
||||
/** The internal mod name */
|
||||
public static final String NAME = "DistantHorizons";
|
||||
/** Human-readable version of NAME */
|
||||
/** Human readable version of NAME */
|
||||
public static final String READABLE_NAME = "Distant Horizons";
|
||||
public static final String VERSION = "1.7.0a-dev";
|
||||
/** Returns true if the current build is an unstable developer build, false otherwise. */
|
||||
public static boolean IS_DEV_BUILD = VERSION.toLowerCase().contains("dev");
|
||||
|
||||
|
||||
/** This version should only be updated when breaking changes are introduced to the DH API */
|
||||
public static final int API_MAJOR_VERSION = 1;
|
||||
/** This version should be updated whenever new methods are added to the DH API */
|
||||
public static final int API_MINOR_VERSION = 1;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.seibel.lod.core.config;
|
||||
|
||||
import com.seibel.lod.core.api.ClientApi;
|
||||
import com.seibel.lod.core.api.internal.ClientApi;
|
||||
import com.seibel.lod.core.config.file.ConfigFileHandling;
|
||||
import com.seibel.lod.core.config.gui.AbstractScreen;
|
||||
import com.seibel.lod.core.config.types.AbstractConfigType;
|
||||
@@ -46,7 +46,8 @@ public class ConfigBase {
|
||||
acceptableInputs.add(HashMap.class); // TODO[CONFIG]: This is handled separately to check the first input is String and the second input is valid
|
||||
}
|
||||
|
||||
public static boolean disableMinMax = false;
|
||||
/** Disables the minimum and maximum of a variable */
|
||||
public static boolean disableMinMax = false; // Very fun to use
|
||||
public static final List<AbstractConfigType<?, ?>> entries = new ArrayList<>();
|
||||
|
||||
public static void init(Class<?> config) {
|
||||
|
||||
@@ -2,12 +2,12 @@ package com.seibel.lod.core.config.file;
|
||||
|
||||
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||
import com.seibel.lod.core.ModInfo;
|
||||
import com.seibel.lod.core.api.ClientApi;
|
||||
import com.seibel.lod.core.api.internal.ClientApi;
|
||||
import com.seibel.lod.core.config.ConfigBase;
|
||||
import com.seibel.lod.core.config.types.AbstractConfigType;
|
||||
import com.seibel.lod.core.config.types.ConfigEntry;
|
||||
import com.seibel.lod.core.util.SingletonHandler;
|
||||
import com.seibel.lod.core.wrapperInterfaces.minecraft.IMinecraftWrapper;
|
||||
import com.seibel.lod.core.handlers.dependencyInjection.SingletonHandler;
|
||||
import com.seibel.lod.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.json.simple.parser.ParseException;
|
||||
@@ -23,7 +23,7 @@ import java.util.HashMap;
|
||||
* @author coolGi2007
|
||||
*/
|
||||
public class ConfigFileHandling {
|
||||
public static final Path ConfigPath = SingletonHandler.get(IMinecraftWrapper.class).getGameDirectory().toPath().resolve("config").resolve(ModInfo.NAME+".toml");
|
||||
public static final Path ConfigPath = SingletonHandler.get(IMinecraftClientWrapper.class).getGameDirectory().toPath().resolve("config").resolve(ModInfo.NAME+".toml");
|
||||
|
||||
/** Saves the config to the file */
|
||||
public static void saveToFile() {
|
||||
@@ -122,7 +122,7 @@ public class ConfigFileHandling {
|
||||
));
|
||||
} else if (entry.getType().isAssignableFrom(HashMap.class)) {
|
||||
entry.setWTSave((T) getHashMapFromString(workConfig.get(entry.getNameWCategory())));
|
||||
} else { // TODO: Made a way to make the number be castable to the correct type
|
||||
} else {
|
||||
entry.setWTSave((T) workConfig.get(entry.getNameWCategory()));
|
||||
if (entry.isValid() == 0)
|
||||
return;
|
||||
@@ -171,7 +171,7 @@ public class ConfigFileHandling {
|
||||
} catch (IOException ex) {
|
||||
System.out.println("Creating file failed");
|
||||
ex.printStackTrace();
|
||||
SingletonHandler.get(IMinecraftWrapper.class).crashMinecraft("Loading file and resetting config file failed at path ["+ConfigPath+"]. Please check the file is ok and you have the permissions", ex);
|
||||
SingletonHandler.get(IMinecraftClientWrapper.class).crashMinecraft("Loading file and resetting config file failed at path ["+ConfigPath+"]. Please check the file is ok and you have the permissions", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.seibel.lod.core.config.types;
|
||||
|
||||
import com.seibel.lod.core.api.ClientApi;
|
||||
import com.seibel.lod.core.config.ConfigEntryAppearance;
|
||||
|
||||
public class ConfigCategory extends AbstractConfigType<Class, ConfigCategory> {
|
||||
|
||||
@@ -3,13 +3,14 @@ package com.seibel.lod.core.config.types;
|
||||
import com.seibel.lod.core.config.ConfigBase;
|
||||
import com.seibel.lod.core.config.ConfigEntryAppearance;
|
||||
import com.seibel.lod.core.config.file.ConfigFileHandling;
|
||||
import com.seibel.lod.core.objects.MinDefaultMax;
|
||||
|
||||
/**
|
||||
* Use for making the config variables
|
||||
*
|
||||
* @author coolGi2007
|
||||
*/
|
||||
public class ConfigEntry<T> extends AbstractConfigType<T, ConfigEntry> {
|
||||
public class ConfigEntry<T> extends AbstractConfigType<T, ConfigEntry<T>> {
|
||||
private T defaultValue;
|
||||
private String comment;
|
||||
private T min;
|
||||
@@ -46,6 +47,13 @@ public class ConfigEntry<T> extends AbstractConfigType<T, ConfigEntry> {
|
||||
return value;
|
||||
}
|
||||
|
||||
public MinDefaultMax<T> getMinValueMax() {
|
||||
return new MinDefaultMax<T>(min, value, max);
|
||||
}
|
||||
public MinDefaultMax<T> getMinDefaultMax() {
|
||||
return new MinDefaultMax<T>(min, defaultValue, max);
|
||||
}
|
||||
|
||||
/** Sets the value without saving */
|
||||
public void setWTSave(T newValue) {
|
||||
this.value = newValue;
|
||||
@@ -67,6 +75,11 @@ public class ConfigEntry<T> extends AbstractConfigType<T, ConfigEntry> {
|
||||
public void setMax(T newMax) {
|
||||
this.max = newMax;
|
||||
}
|
||||
/** Sets the min and max in 1 setter */
|
||||
public void setMinMax(T newMin, T newMax) {
|
||||
this.max = newMin;
|
||||
this.min = newMax;
|
||||
}
|
||||
|
||||
/** Gets the comment */
|
||||
public String getComment() {
|
||||
@@ -86,17 +99,7 @@ public class ConfigEntry<T> extends AbstractConfigType<T, ConfigEntry> {
|
||||
* -1 == number too low
|
||||
*/
|
||||
public byte isValid() {
|
||||
if (ConfigBase.disableMinMax)
|
||||
return 0;
|
||||
if (Number.class.isAssignableFrom(this.value.getClass())) { // Only check min max if it is a number
|
||||
if (this.max != null && Double.valueOf(this.value.toString()) > Double.valueOf(this.max.toString()))
|
||||
return 1;
|
||||
if (this.min != null && Double.valueOf(this.value.toString()) < Double.valueOf(this.min.toString()))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
return isValid(value);
|
||||
}
|
||||
/** Checks if a value is valid */
|
||||
public byte isValid(T value) {
|
||||
@@ -139,7 +142,7 @@ public class ConfigEntry<T> extends AbstractConfigType<T, ConfigEntry> {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Builder<T> extends AbstractConfigType.Builder<T, Builder> {
|
||||
public static class Builder<T> extends AbstractConfigType.Builder<T, Builder<T>> {
|
||||
private String tmpComment;
|
||||
private T tmpMin;
|
||||
private T tmpMax;
|
||||
@@ -150,12 +153,27 @@ public class ConfigEntry<T> extends AbstractConfigType<T, ConfigEntry> {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<T> setMinDefaultMax(MinDefaultMax<T> newMinDefaultMax) {
|
||||
this.set(newMinDefaultMax.defaultValue);
|
||||
this.setMinMax(newMinDefaultMax.minValue, newMinDefaultMax.maxValue);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<T> setMinMax(T newMin, T newMax) {
|
||||
this.tmpMin = newMin;
|
||||
this.tmpMax = newMax;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<T> setMin(T newMin) {
|
||||
this.tmpMin = newMin;
|
||||
return this;
|
||||
}
|
||||
public Builder<T> setMax(T newMax) {
|
||||
this.tmpMax = newMax;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<T> setUseApiOverwrite(boolean newUseApiOverwrite) {
|
||||
this.tmpUseApiOverwrite = newUseApiOverwrite;
|
||||
return this;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.seibel.lod.core.jar;
|
||||
|
||||
import com.seibel.lod.core.handlers.dependencyInjection.SingletonHandler;
|
||||
import com.seibel.lod.core.jar.wrapperInterfaces.config.ConfigWrapper;
|
||||
import com.seibel.lod.core.util.SingletonHandler;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.IConfigWrapper;
|
||||
|
||||
public class JarDependencySetup {
|
||||
|
||||
@@ -26,6 +26,7 @@ package com.seibel.lod.core.objects;
|
||||
* @version 11-14-2021
|
||||
* @param <T> The data type this object is storing
|
||||
*/
|
||||
@Deprecated
|
||||
public class MinDefaultMax<T>
|
||||
{
|
||||
public final T minValue;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.seibel.lod.core.wrapperInterfaces.config;
|
||||
|
||||
public interface IConfigWrapper {
|
||||
import com.seibel.lod.core.handlers.dependencyInjection.IBindable;
|
||||
|
||||
public interface IConfigWrapper extends IBindable {
|
||||
|
||||
boolean langExists(String str);
|
||||
|
||||
|
||||
+3
-7
@@ -28,14 +28,10 @@ import com.seibel.lod.core.wrapperInterfaces.IVersionConstants;
|
||||
import com.seibel.lod.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper;
|
||||
|
||||
/**
|
||||
* This holds the config defaults, setters/getters
|
||||
* that should be hooked into the host mod loader (Fabric, Forge, etc.), and
|
||||
* the options that should be implemented in a configWrapperSingleton.
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 12-14-2021
|
||||
* Use the real config rather than these getters
|
||||
*/
|
||||
public interface ILodConfigWrapperSingleton
|
||||
@Deprecated
|
||||
public interface ILodConfigWrapperSingleton extends IBindable
|
||||
{
|
||||
IClient client();
|
||||
|
||||
|
||||
+409
-11
@@ -1,11 +1,11 @@
|
||||
package com.seibel.lod.core.wrapperInterfaces.config;
|
||||
|
||||
import com.seibel.lod.core.Config;
|
||||
import com.seibel.lod.core.enums.config.*;
|
||||
import com.seibel.lod.core.enums.rendering.*;
|
||||
import com.seibel.lod.core.Config;
|
||||
|
||||
/**
|
||||
* Will be removed
|
||||
* Use config getters rather than this
|
||||
*/
|
||||
@Deprecated
|
||||
public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@@ -24,6 +24,7 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
{
|
||||
public final IGraphics graphics;
|
||||
public final IWorldGenerator worldGenerator;
|
||||
public final IMultiplayer multiplayer;
|
||||
public final IAdvanced advanced;
|
||||
|
||||
|
||||
@@ -39,6 +40,11 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
return worldGenerator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMultiplayer multiplayer() {
|
||||
return multiplayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAdvanced advanced()
|
||||
{
|
||||
@@ -65,6 +71,7 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
{
|
||||
graphics = new Graphics();
|
||||
worldGenerator = new WorldGenerator();
|
||||
multiplayer = new Multiplayer();
|
||||
advanced = new Advanced();
|
||||
}
|
||||
|
||||
@@ -176,11 +183,28 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
public void setDropoffQuality(DropoffQuality newDropoffQuality) {
|
||||
Config.Client.Graphics.Quality.dropoffQuality.set(newDropoffQuality);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLodBiomeBlending() {
|
||||
return Config.Client.Graphics.Quality.lodBiomeBlending.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLodBiomeBlending(int newLodBiomeBlending) {
|
||||
Config.Client.Graphics.Quality.lodBiomeBlending.set(newLodBiomeBlending);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class FogQuality implements IFogQuality
|
||||
{
|
||||
public final IAdvancedFog advancedFog;
|
||||
|
||||
FogQuality()
|
||||
{
|
||||
advancedFog = new AdvancedFog();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FogDistance getFogDistance()
|
||||
{
|
||||
@@ -229,6 +253,152 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
{
|
||||
Config.Client.Graphics.FogQuality.disableVanillaFog.set(newDisableVanillaFog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAdvancedFog advancedFog() {
|
||||
return advancedFog;
|
||||
}
|
||||
|
||||
public static class AdvancedFog implements IAdvancedFog {
|
||||
public final IHeightFog heightFog;
|
||||
|
||||
public AdvancedFog() {
|
||||
heightFog = new HeightFog();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getFarFogStart() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.farFogStart.get();
|
||||
}
|
||||
@Override
|
||||
public double getFarFogEnd() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.farFogEnd.get();
|
||||
}
|
||||
@Override
|
||||
public double getFarFogMin() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.farFogMin.get();
|
||||
}
|
||||
@Override
|
||||
public double getFarFogMax() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.farFogMax.get();
|
||||
}
|
||||
@Override
|
||||
public FogSetting.FogType getFarFogType() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.farFogType.get();
|
||||
}
|
||||
@Override
|
||||
public double getFarFogDensity() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.farFogDensity.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFarFogStart(double newFarFogStart) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.farFogStart.set(newFarFogStart);
|
||||
}
|
||||
@Override
|
||||
public void setFarFogEnd(double newFarFogEnd) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.farFogEnd.set(newFarFogEnd);
|
||||
}
|
||||
@Override
|
||||
public void setFarFogMin(double newFarFogMin) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.farFogMin.set(newFarFogMin);
|
||||
}
|
||||
@Override
|
||||
public void setFarFogMax(double newFarFogMax) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.farFogMax.set(newFarFogMax);
|
||||
}
|
||||
@Override
|
||||
public void setFarFogType(FogSetting.FogType newFarFogType) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.farFogType.set(newFarFogType);
|
||||
}
|
||||
@Override
|
||||
public void setFarFogDensity(double newFarFogDensity) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.farFogDensity.set(newFarFogDensity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IHeightFog heightFog() {
|
||||
return heightFog;
|
||||
}
|
||||
|
||||
public static class HeightFog implements IHeightFog {
|
||||
|
||||
@Override
|
||||
public HeightFogMixMode getHeightFogMixMode() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogMixMode.get();
|
||||
}
|
||||
@Override
|
||||
public HeightFogMode getHeightFogMode() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogMode.get();
|
||||
}
|
||||
@Override
|
||||
public double getHeightFogHeight() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogHeight.get();
|
||||
}
|
||||
@Override
|
||||
public double getHeightFogStart() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogStart.get();
|
||||
}
|
||||
@Override
|
||||
public double getHeightFogEnd() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogEnd.get();
|
||||
}
|
||||
@Override
|
||||
public double getHeightFogMin() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogMin.get();
|
||||
}
|
||||
@Override
|
||||
public double getHeightFogMax() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogMax.get();
|
||||
}
|
||||
@Override
|
||||
public FogSetting.FogType getHeightFogType() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogType.get();
|
||||
}
|
||||
@Override
|
||||
public double getHeightFogDensity() {
|
||||
return Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogDensity.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHeightFogMixMode(HeightFogMixMode newHeightFogMixMode) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogMixMode.set(newHeightFogMixMode);
|
||||
}
|
||||
@Override
|
||||
public void setHeightFogMode(HeightFogMode newHeightFogMode) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogMode.set(newHeightFogMode);
|
||||
}
|
||||
@Override
|
||||
public void setHeightFogHeight(double newHeightFogHeight) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogHeight.set(newHeightFogHeight);
|
||||
}
|
||||
@Override
|
||||
public void setHeightFogStart(double newHeightFogStart) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogStart.set(newHeightFogStart);
|
||||
}
|
||||
@Override
|
||||
public void setHeightFogEnd(double newHeightFogEnd) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogEnd.set(newHeightFogEnd);
|
||||
}
|
||||
@Override
|
||||
public void setHeightFogMin(double newHeightFogMin) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogMin.set(newHeightFogMin);
|
||||
}
|
||||
@Override
|
||||
public void setHeightFogMax(double newHeightFogMax) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogMax.set(newHeightFogMax);
|
||||
}
|
||||
@Override
|
||||
public void setHeightFogType(FogSetting.FogType newHeightFogType) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogType.set(newHeightFogType);
|
||||
}
|
||||
@Override
|
||||
public void setHeightFogDensity(double newHeightFogDensity) {
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogDensity.set(newHeightFogDensity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -257,6 +427,27 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
Config.Client.Graphics.AdvancedGraphics.vanillaOverdraw.set(newVanillaOverdraw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOverdrawOffset() {
|
||||
return Config.Client.Graphics.AdvancedGraphics.overdrawOffset.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOverdrawOffset(int newOverdrawOffset) {
|
||||
Config.Client.Graphics.AdvancedGraphics.overdrawOffset.set(newOverdrawOffset);
|
||||
}
|
||||
/*
|
||||
@Override
|
||||
public int getBacksideCullingRange()
|
||||
{
|
||||
return Config.Client.Graphics.AdvancedGraphics.backsideCullingRange;
|
||||
}
|
||||
@Override
|
||||
public void setBacksideCullingRange(int newBacksideCullingRange)
|
||||
{
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.advancedGraphics.backsideCullingRange").value = newBacksideCullingRange;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.advancedGraphics.backsideCullingRange");
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public boolean getUseExtendedNearClipPlane()
|
||||
@@ -268,6 +459,62 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
{
|
||||
Config.Client.Graphics.AdvancedGraphics.useExtendedNearClipPlane.set(newUseExtendedNearClipPlane);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getBrightnessMultiplier()
|
||||
{
|
||||
return Config.Client.Graphics.AdvancedGraphics.brightnessMultiplier.get();
|
||||
}
|
||||
@Override
|
||||
public void setBrightnessMultiplier(double newBrightnessMultiplier)
|
||||
{
|
||||
Config.Client.Graphics.AdvancedGraphics.brightnessMultiplier.set(newBrightnessMultiplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getSaturationMultiplier()
|
||||
{
|
||||
return Config.Client.Graphics.AdvancedGraphics.saturationMultiplier.get();
|
||||
}
|
||||
@Override
|
||||
public void setSaturationMultiplier(double newSaturationMultiplier)
|
||||
{
|
||||
Config.Client.Graphics.AdvancedGraphics.saturationMultiplier.set(newSaturationMultiplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getEnableCaveCulling() {
|
||||
return Config.Client.Graphics.AdvancedGraphics.enableCaveCulling.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnableCaveCulling(boolean newEnableCaveCulling) {
|
||||
Config.Client.Graphics.AdvancedGraphics.enableCaveCulling.set(newEnableCaveCulling);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCaveCullingHeight() {
|
||||
return Config.Client.Graphics.AdvancedGraphics.caveCullingHeight.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCaveCullingHeight(int newCaveCullingHeight) {
|
||||
Config.Client.Graphics.AdvancedGraphics.caveCullingHeight.set(newCaveCullingHeight);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEarthCurveRatio()
|
||||
{
|
||||
return Config.Client.Graphics.AdvancedGraphics.earthCurveRatio.get();
|
||||
}
|
||||
@Override
|
||||
public void setEarthCurveRatio(int newEarthCurveRatio)
|
||||
{
|
||||
// if (newEarthCurveRatio < 50) newEarthCurveRatio = 0; // TODO: Leetom can you please remove this
|
||||
Config.Client.Graphics.AdvancedGraphics.earthCurveRatio.set(newEarthCurveRatio);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,6 +597,36 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
|
||||
|
||||
|
||||
//=====================//
|
||||
// Multiplayer Configs //
|
||||
//=====================//
|
||||
public static class Multiplayer implements IMultiplayer
|
||||
{
|
||||
@Override
|
||||
public ServerFolderNameMode getServerFolderNameMode()
|
||||
{
|
||||
return Config.Client.Multiplayer.serverFolderNameMode.get();
|
||||
}
|
||||
@Override
|
||||
public void setServerFolderNameMode(ServerFolderNameMode newServerFolderNameMode)
|
||||
{
|
||||
Config.Client.Multiplayer.serverFolderNameMode.set(newServerFolderNameMode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMultiDimensionRequiredSimilarity()
|
||||
{
|
||||
return Config.Client.Multiplayer.multiDimensionRequiredSimilarity.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMultiDimensionRequiredSimilarity(double newMultiDimensionMinimumSimilarityPercent)
|
||||
{
|
||||
Config.Client.Multiplayer.multiDimensionRequiredSimilarity.set(newMultiDimensionMinimumSimilarityPercent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//============================//
|
||||
// AdvancedModOptions Configs //
|
||||
@@ -392,12 +669,12 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
public static class Threading implements IThreading
|
||||
{
|
||||
@Override
|
||||
public int getNumberOfWorldGenerationThreads()
|
||||
public double getNumberOfWorldGenerationThreads()
|
||||
{
|
||||
return Config.Client.Advanced.Threading.numberOfWorldGenerationThreads.get();
|
||||
}
|
||||
@Override
|
||||
public void setNumberOfWorldGenerationThreads(int newNumberOfWorldGenerationThreads)
|
||||
public void setNumberOfWorldGenerationThreads(double newNumberOfWorldGenerationThreads)
|
||||
{
|
||||
Config.Client.Advanced.Threading.numberOfWorldGenerationThreads.set(newNumberOfWorldGenerationThreads);
|
||||
}
|
||||
@@ -423,17 +700,27 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
//===============//
|
||||
public static class Debugging implements IDebugging
|
||||
{
|
||||
public final IDebugSwitch debugSwitch;
|
||||
|
||||
@Override
|
||||
public boolean getDrawLods()
|
||||
public IDebugSwitch debugSwitch()
|
||||
{
|
||||
return Config.Client.Advanced.Debugging.drawLods.get();
|
||||
}
|
||||
@Override
|
||||
public void setDrawLods(boolean newDrawLods)
|
||||
{
|
||||
Config.Client.Advanced.Debugging.drawLods.set(newDrawLods);
|
||||
return debugSwitch;
|
||||
}
|
||||
|
||||
/* RendererType:
|
||||
* DEFAULT
|
||||
* DEBUG
|
||||
* DISABLED
|
||||
* */
|
||||
@Override
|
||||
public RendererType getRendererType() {
|
||||
return Config.Client.Advanced.Debugging.rendererType.get();
|
||||
}
|
||||
@Override
|
||||
public void setRendererType(RendererType newRenderType) {
|
||||
Config.Client.Advanced.Debugging.rendererType.set(newRenderType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DebugMode getDebugMode()
|
||||
@@ -457,6 +744,107 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
{
|
||||
Config.Client.Advanced.Debugging.enableDebugKeybindings.set(newEnableDebugKeybindings);
|
||||
}
|
||||
|
||||
public Debugging()
|
||||
{
|
||||
debugSwitch = new DebugSwitch();
|
||||
}
|
||||
|
||||
public static class DebugSwitch implements IDebugSwitch {
|
||||
|
||||
/* The logging switches available:
|
||||
* WorldGenEvent
|
||||
* WorldGenPerformance
|
||||
* WorldGenLoadEvent
|
||||
* LodBuilderEvent
|
||||
* RendererBufferEvent
|
||||
* RendererGLEvent
|
||||
* FileReadWriteEvent
|
||||
* FileSubDimEvent
|
||||
* NetworkEvent //NOT IMPL YET
|
||||
*/
|
||||
|
||||
@Override
|
||||
public LoggerMode getLogWorldGenEvent() {
|
||||
return Config.Client.Advanced.Debugging.DebugSwitch.logWorldGenEvent.get();
|
||||
}
|
||||
@Override
|
||||
public void setLogWorldGenEvent(LoggerMode newLogWorldGenEvent) {
|
||||
Config.Client.Advanced.Debugging.DebugSwitch.logWorldGenEvent.set(newLogWorldGenEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoggerMode getLogWorldGenPerformance() {
|
||||
return Config.Client.Advanced.Debugging.DebugSwitch.logWorldGenPerformance.get();
|
||||
}
|
||||
@Override
|
||||
public void setLogWorldGenPerformance(LoggerMode newLogWorldGenPerformance) {
|
||||
Config.Client.Advanced.Debugging.DebugSwitch.logWorldGenPerformance.set(newLogWorldGenPerformance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoggerMode getLogWorldGenLoadEvent() {
|
||||
return Config.Client.Advanced.Debugging.DebugSwitch.logWorldGenLoadEvent.get();
|
||||
}
|
||||
@Override
|
||||
public void setLogWorldGenLoadEvent(LoggerMode newLogWorldGenLoadEvent) {
|
||||
Config.Client.Advanced.Debugging.DebugSwitch.logWorldGenLoadEvent.set(newLogWorldGenLoadEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoggerMode getLogLodBuilderEvent() {
|
||||
return Config.Client.Advanced.Debugging.DebugSwitch.logLodBuilderEvent.get();
|
||||
}
|
||||
@Override
|
||||
public void setLogLodBuilderEvent(LoggerMode newLogLodBuilderEvent) {
|
||||
Config.Client.Advanced.Debugging.DebugSwitch.logLodBuilderEvent.set(newLogLodBuilderEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoggerMode getLogRendererBufferEvent() {
|
||||
return Config.Client.Advanced.Debugging.DebugSwitch.logRendererBufferEvent.get();
|
||||
}
|
||||
@Override
|
||||
public void setLogRendererBufferEvent(LoggerMode newLogRendererBufferEvent) {
|
||||
Config.Client.Advanced.Debugging.DebugSwitch.logRendererBufferEvent.set(newLogRendererBufferEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoggerMode getLogRendererGLEvent() {
|
||||
return Config.Client.Advanced.Debugging.DebugSwitch.logRendererGLEvent.get();
|
||||
}
|
||||
@Override
|
||||
public void setLogRendererGLEvent(LoggerMode newLogRendererGLEvent) {
|
||||
Config.Client.Advanced.Debugging.DebugSwitch.logRendererGLEvent.set(newLogRendererGLEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoggerMode getLogFileReadWriteEvent() {
|
||||
return Config.Client.Advanced.Debugging.DebugSwitch.logFileReadWriteEvent.get();
|
||||
}
|
||||
@Override
|
||||
public void setLogFileReadWriteEvent(LoggerMode newLogFileReadWriteEvent) {
|
||||
Config.Client.Advanced.Debugging.DebugSwitch.logFileReadWriteEvent.set(newLogFileReadWriteEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoggerMode getLogFileSubDimEvent() {
|
||||
return Config.Client.Advanced.Debugging.DebugSwitch.logFileSubDimEvent.get();
|
||||
}
|
||||
@Override
|
||||
public void setLogFileSubDimEvent(LoggerMode newLogFileSubDimEvent) {
|
||||
Config.Client.Advanced.Debugging.DebugSwitch.logFileSubDimEvent.set(newLogFileSubDimEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoggerMode getLogNetworkEvent() {
|
||||
return Config.Client.Advanced.Debugging.DebugSwitch.logNetworkEvent.get();
|
||||
}
|
||||
@Override
|
||||
public void setLogNetworkEvent(LoggerMode newLogNetworkEvent) {
|
||||
Config.Client.Advanced.Debugging.DebugSwitch.logNetworkEvent.set(newLogNetworkEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -497,6 +885,16 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
Config.Client.Advanced.Buffers.rebuildTimes.set(newBufferRebuildTimes);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getLodOnlyMode() {
|
||||
return Config.Client.Advanced.lodOnlyMode.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLodOnlyMode(boolean newLodOnlyMode) {
|
||||
Config.Client.Advanced.lodOnlyMode.set(newLodOnlyMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
"Distant Horizons",
|
||||
"lod.config.title":
|
||||
"Distant Horizons config",
|
||||
"lod.config.optionsButton":
|
||||
"Show options button",
|
||||
"lod.config.optionsButton.@tooltip":
|
||||
"Show the config button to the left of the fov button",
|
||||
"lod.config.client":
|
||||
"Client",
|
||||
"lod.config.client.optionsButton":
|
||||
"Show options button",
|
||||
"lod.config.client.optionsButton.@tooltip":
|
||||
"Show the config button to the left of the fov button",
|
||||
"lod.config.client.graphics":
|
||||
"Graphics",
|
||||
"lod.config.client.graphics.quality":
|
||||
|
||||
Reference in New Issue
Block a user