Remove "config" from API config method names

IE getFogConfig()
The additional config was already implied.
This commit is contained in:
James Seibel
2022-09-15 20:30:49 -05:00
parent 14bd059a88
commit 541fbbb36b
16 changed files with 255 additions and 189 deletions
@@ -0,0 +1,15 @@
package com.seibel.lod.api.items.interfaces.config;
import com.seibel.lod.core.interfaces.dependencyInjection.IBindable;
/**
* This interface is just used to organize API config groups so
* they can be more easily handled together.
*
* @author James Seibel
* @version 9-15-2022
*/
public interface IDhApiConfigGroup extends IBindable
{
}
@@ -23,7 +23,8 @@ import com.seibel.lod.api.items.enums.config.EBlocksToAvoid;
import com.seibel.lod.api.items.enums.config.EDistanceGenerationMode;
import com.seibel.lod.api.items.enums.config.EGenerationPriority;
import com.seibel.lod.api.items.enums.config.ELightGenerationMode;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigGroup;
/**
* Distant Horizons' world generation configuration. <br><br>
@@ -33,33 +34,33 @@ import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiWorldGenerationConfig
public interface IDhApiWorldGenerationConfig extends IDhApiConfigGroup
{
/**
* Defines whether fake chunks will be generated
* outside Minecraft's vanilla render distance.
*/
IDhApiConfig<Boolean> getEnableDistantWorldGenerationConfig();
IDhApiConfigValue<Boolean> getEnableDistantWorldGeneration();
/** Defines to what level fake chunks will be generated. */
IDhApiConfig<EDistanceGenerationMode> getDistantGeneratorDetailLevelConfig();
IDhApiConfigValue<EDistanceGenerationMode> getDistantGeneratorDetailLevel();
/** Defines how generated fake chunks will be lit. */
IDhApiConfig<ELightGenerationMode> getLightingModeConfig();
IDhApiConfigValue<ELightGenerationMode> getLightingMode();
/** Defines the order in which fake chunks will be generated. */
IDhApiConfig<EGenerationPriority> getGenerationPriorityConfig();
IDhApiConfigValue<EGenerationPriority> getGenerationPriority();
/**
* Defines what blocks will be ignored when generating LODs.
* Defines what blocks will be ignored when generating LODs. <br><br>
*
* TODO if this isn't deprecated before 1.7 it should probably be moved to the graphics tab
* @deprecated this method won't be needed once we transition to an ID based save system <br>
* (vs the color based system we have currently)
*/
@Deprecated
IDhApiConfig<EBlocksToAvoid> getBlocksToAvoidConfig();
IDhApiConfigValue<EBlocksToAvoid> getBlocksToAvoid();
/**
* Defines if the color of avoided blocks will color the block below them. <Br>
@@ -70,7 +71,7 @@ public interface IDhApiWorldGenerationConfig
* (vs the color based system we have currently)
*/
@Deprecated
IDhApiConfig<Boolean> getTintWithAvoidedBlocksConfig();
IDhApiConfigValue<Boolean> getTintWithAvoidedBlocks();
}
@@ -20,7 +20,8 @@
package com.seibel.lod.api.items.interfaces.config.client;
import com.seibel.lod.api.items.enums.config.EGpuUploadMethod;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigGroup;
/**
* Distant Horizons' OpenGL buffer configuration.
@@ -28,11 +29,11 @@ import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiBuffersConfig
public interface IDhApiBuffersConfig extends IDhApiConfigGroup
{
/** Defines how geometry data is uploaded to the GPU. */
IDhApiConfig<EGpuUploadMethod> getGpuUploadMethodConfig();
IDhApiConfigValue<EGpuUploadMethod> getGpuUploadMethod();
/**
* Defines how long we should wait after uploading one
@@ -41,6 +42,6 @@ public interface IDhApiBuffersConfig
* This can be set to a non-zero number to reduce stuttering caused by
* uploading buffers to the GPU.
*/
IDhApiConfig<Integer> getBufferUploadTimeoutPerMegabyteInMillisecondsConfig();
IDhApiConfigValue<Integer> getBufferUploadTimeoutPerMegabyteInMilliseconds();
}
@@ -20,7 +20,8 @@
package com.seibel.lod.api.items.interfaces.config.client;
import com.seibel.lod.api.items.enums.rendering.EDebugMode;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigGroup;
/**
* Distant Horizons' debug configuration.
@@ -28,13 +29,13 @@ import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiDebuggingConfig
public interface IDhApiDebuggingConfig extends IDhApiConfigGroup
{
/** Can be used to debug the standard fake chunk rendering. */
IDhApiConfig<EDebugMode> getDebugRenderModeConfig();
IDhApiConfigValue<EDebugMode> getDebugRenderMode();
/** If enabled debug keybindings can be used. */
IDhApiConfig<Boolean> getEnableDebugKeybindingsConfig();
IDhApiConfigValue<Boolean> getEnableDebugKeybindings();
}
@@ -21,7 +21,8 @@ package com.seibel.lod.api.items.interfaces.config.client;
import com.seibel.lod.api.items.enums.config.*;
import com.seibel.lod.api.items.enums.rendering.ERendererMode;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigGroup;
/**
* Distant Horizons' graphics/rendering configuration.
@@ -29,7 +30,7 @@ import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiGraphicsConfig
public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
{
//========================//
@@ -37,15 +38,15 @@ public interface IDhApiGraphicsConfig
//========================//
/** The distance is the radius measured in chunks. */
IDhApiConfig<Integer> getChunkRenderDistanceConfig();
IDhApiConfigValue<Integer> getChunkRenderDistance();
/**
* Simplified version of {@link IDhApiGraphicsConfig#getRenderingModeConfig()}
* Simplified version of {@link IDhApiGraphicsConfig#getRenderingMode()}
* that only enables/disables the fake chunk rendering. <br><br>
*
* Changing this config also changes {@link IDhApiGraphicsConfig#getRenderingModeConfig()}'s value.
* Changing this config also changes {@link IDhApiGraphicsConfig#getRenderingMode()}'s value.
*/
IDhApiConfig<Boolean> getRenderingEnabledConfig();
IDhApiConfigValue<Boolean> getRenderingEnabled();
/**
* Can be used to enable/disable fake chunk rendering or enable the debug renderer. <br><br>
@@ -53,9 +54,9 @@ public interface IDhApiGraphicsConfig
* The debug renderer is used to confirm rendering is working at and will draw
* a single multicolor rhombus on the screen in skybox space (AKA behind MC's rendering). <br><br>
*
* Changing this config also changes {@link IDhApiGraphicsConfig#getRenderingEnabledConfig()}'s value.
* Changing this config also changes {@link IDhApiGraphicsConfig#getRenderingEnabled()}'s value.
*/
IDhApiConfig<ERendererMode> getRenderingModeConfig();
IDhApiConfigValue<ERendererMode> getRenderingMode();
@@ -64,13 +65,13 @@ public interface IDhApiGraphicsConfig
//==================//
/** Defines how detailed fake chunks are in the horizontal direction */
IDhApiConfig<EHorizontalResolution> getMaxDetailLevelConfig();
IDhApiConfigValue<EHorizontalResolution> getMaxDetailLevel();
/** Defines how detailed fake chunks are in the vertical direction */
IDhApiConfig<EVerticalQuality> getVerticalQualityConfig();
IDhApiConfigValue<EVerticalQuality> getVerticalQuality();
/** Modifies the quadratic function fake chunks use for horizontal quality drop-off. */
IDhApiConfig<EHorizontalQuality> getHorizontalQualityDropoffConfig();
IDhApiConfigValue<EHorizontalQuality> getHorizontalQualityDropoff();
/**
* The same as vanilla Minecraft's biome blending. <br><br>
@@ -80,7 +81,7 @@ public interface IDhApiGraphicsConfig
* 2 = blending of 5x5 <br>
* ... <br>
*/
IDhApiConfig<Integer> getBiomeBlendingConfig();
IDhApiConfigValue<Integer> getBiomeBlending();
@@ -89,13 +90,13 @@ public interface IDhApiGraphicsConfig
//===========================//
/** If directional culling is disabled fake chunks will be rendered behind the camera. */
IDhApiConfig<Boolean> getDisableDirectionalCullingConfig();
IDhApiConfigValue<Boolean> getDisableDirectionalCulling();
/** Determines how fake chunks are rendered in comparison to vanilla MC's chunks. */
IDhApiConfig<EVanillaOverdraw> getVanillaOverdrawConfig();
IDhApiConfigValue<EVanillaOverdraw> getVanillaOverdraw();
/** Modifies how far the vanilla overdraw is rendered in chunks. */
IDhApiConfig<Integer> getVanillaOverdrawOffsetConfig();
IDhApiConfigValue<Integer> getVanillaOverdrawOffset();
/**
* If enabled the near clip plane is extended to reduce
@@ -103,34 +104,34 @@ public interface IDhApiGraphicsConfig
* 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.
*/
IDhApiConfig<Boolean> getUseExtendedNearClipPlaneConfig();
IDhApiConfigValue<Boolean> getUseExtendedNearClipPlane();
/**
* Modifies how bright fake chunks are. <br>
* This is done when generating the vertex data and is applied before any shaders.
*/
IDhApiConfig<Double> getBrightnessMultiplierConfig();
IDhApiConfigValue<Double> getBrightnessMultiplier();
/**
* Modifies how saturated fake chunks are. <br>
* This is done when generating the vertex data and is applied before any shaders.
*/
IDhApiConfig<Double> getSaturationMultiplierConfig();
IDhApiConfigValue<Double> getSaturationMultiplier();
/** Defines if Distant Horizons should attempt to cull fake chunk cave geometry. */
IDhApiConfig<Boolean> getCaveCullingEnabledConfig();
IDhApiConfigValue<Boolean> getCaveCullingEnabled();
/** Defines what height cave culling should be used below if enabled. */
IDhApiConfig<Integer> getCaveCullingHeightConfig();
IDhApiConfigValue<Integer> getCaveCullingHeight();
/** This ratio is relative to Earth's real world curvature. */
IDhApiConfig<Integer> getEarthCurvatureRatioConfig();
IDhApiConfigValue<Integer> getEarthCurvatureRatio();
/** If enabled vanilla chunk rendering is disabled and only fake chunks are rendered. */
IDhApiConfig<Boolean> getEnableLodOnlyModeConfig();
IDhApiConfigValue<Boolean> getEnableLodOnlyMode();
/** Defines how often the geometry should be rebuilt when the player moves. */
IDhApiConfig<EBufferRebuildTimes> getGeometryRebuildFrequencyConfig();
IDhApiConfigValue<EBufferRebuildTimes> getGeometryRebuildFrequency();
@@ -20,8 +20,8 @@
package com.seibel.lod.api.items.interfaces.config.client;
import com.seibel.lod.api.items.enums.rendering.*;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfig;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigGroup;
/**
* Distant Horizons' fog configuration. <br><br>
@@ -33,7 +33,7 @@ import com.seibel.lod.api.items.objects.config.DhApiConfig;
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiGraphicsFogConfig
public interface IDhApiGraphicsFogConfig extends IDhApiConfigGroup
{
//====================//
@@ -41,19 +41,19 @@ public interface IDhApiGraphicsFogConfig
//====================//
/** Defines at what distance fog is rendered on fake chunks. */
IDhApiConfig<EFogDistance> getFogDistanceConfig();
IDhApiConfigValue<EFogDistance> getFogDistance();
/** Should be used to enable/disable fog rendering. */
IDhApiConfig<EFogDrawMode> getFogRenderConfig();
IDhApiConfigValue<EFogDrawMode> getFogRender();
/** Can be used to enable support with mods that change vanilla MC's fog color. */
IDhApiConfig<EFogColorMode> getFogColorConfig();
IDhApiConfigValue<EFogColorMode> getFogColor();
/**
* If enabled attempts to disable vanilla MC's fog on real chunks. <br>
* May not play nice with other fog editing mods.
*/
IDhApiConfig<Boolean> getDisableVanillaFogConfig();
IDhApiConfigValue<Boolean> getDisableVanillaFog();
//=======================//
@@ -68,7 +68,7 @@ public interface IDhApiGraphicsFogConfig
* 0.0 = fog starts at the camera <br>
* 1.0 = fog starts at the edge of the fake chunk render distance <br>
*/
IDhApiConfig<Double> getFogStartDistanceConfig();
IDhApiConfigValue<Double> getFogStartDistance();
/**
* Defines where the fog ends as a percent of the radius
@@ -78,19 +78,19 @@ public interface IDhApiGraphicsFogConfig
* 0.0 = fog ends at the camera <br>
* 1.0 = fog ends at the edge of the fake chunk render distance <br>
*/
IDhApiConfig<Double> getFogEndDistanceConfig();
IDhApiConfigValue<Double> getFogEndDistance();
/** Defines how opaque the fog is at its thinnest point. */
IDhApiConfig<Double> getFogMinThicknessConfig();
IDhApiConfigValue<Double> getFogMinThickness();
/** Defines how opaque the fog is at its thickest point. */
IDhApiConfig<Double> getFogMaxThicknessConfig();
IDhApiConfigValue<Double> getFogMaxThickness();
/** Defines how the fog changes in thickness. */
IDhApiConfig<EFogFalloff> getFogFalloffConfig();
IDhApiConfigValue<EFogFalloff> getFogFalloff();
/** Defines the fog density. */
IDhApiConfig<Double> getFogDensityConfig();
IDhApiConfigValue<Double> getFogDensity();
//=====================//
@@ -98,33 +98,33 @@ public interface IDhApiGraphicsFogConfig
//=====================//
/** Defines how the height fog mixes. */
IDhApiConfig<EHeightFogMixMode> getHeightFogMixModeConfig();
IDhApiConfigValue<EHeightFogMixMode> getHeightFogMixMode();
/** Defines how the height fog is drawn relative to the camera or world. */
IDhApiConfig<EHeightFogMode> getHeightFogModeConfig();
IDhApiConfigValue<EHeightFogMode> getHeightFogMode();
/**
* Defines the height fog's base height if {@link IDhApiGraphicsFogConfig#getHeightFogModeConfig()}
* Defines the height fog's base height if {@link IDhApiGraphicsFogConfig#getHeightFogMode()}
* is set to use a specific height.
*/
IDhApiConfig<Double> getHeightFogBaseHeightConfig();
IDhApiConfigValue<Double> getHeightFogBaseHeight();
/** Defines the height fog's starting height as a percent of the world height. */
IDhApiConfig<Double> getHeightFogStartingHeightPercentConfig();
IDhApiConfigValue<Double> getHeightFogStartingHeightPercent();
/** Defines the height fog's ending height as a percent of the world height. */
IDhApiConfig<Double> getHeightFogEndingHeightPercentConfig();
IDhApiConfigValue<Double> getHeightFogEndingHeightPercent();
/** Defines how opaque the height fog is at its thinnest point. */
IDhApiConfig<Double> getHeightFogMinThicknessConfig();
IDhApiConfigValue<Double> getHeightFogMinThickness();
/** Defines how opaque the height fog is at its thickest point. */
IDhApiConfig<Double> getHeightFogMaxThicknessConfig();
IDhApiConfigValue<Double> getHeightFogMaxThickness();
/** Defines how the height fog changes in thickness. */
IDhApiConfig<EFogFalloff> getHeightFogFalloffConfig();
IDhApiConfigValue<EFogFalloff> getHeightFogFalloff();
/** Defines the height fog's density. */
IDhApiConfig<Double> getHeightFogDensityConfig();
IDhApiConfigValue<Double> getHeightFogDensity();
}
@@ -20,7 +20,8 @@
package com.seibel.lod.api.items.interfaces.config.client;
import com.seibel.lod.api.items.enums.config.EServerFolderNameMode;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigGroup;
/**
* Distant Horizons' client-side multiplayer configuration.
@@ -28,14 +29,14 @@ import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiMultiplayerConfig
public interface IDhApiMultiplayerConfig extends IDhApiConfigGroup
{
/**
* Defines how multiplayer server folders are named. <br>
* Note: Changing this while connected to a multiplayer world will cause undefined behavior!
*/
IDhApiConfig<EServerFolderNameMode> getFolderSavingModeConfig();
IDhApiConfigValue<EServerFolderNameMode> getFolderSavingMode();
/**
* Defines the necessary similarity (as a percent) that two potential levels
@@ -46,7 +47,7 @@ public interface IDhApiMultiplayerConfig
* Setting this to a non-zero value allows for usage in servers that user Multiverse
* or similar mods.
*/
IDhApiConfig<Double> getMultiverseSimilarityRequirementConfig();
IDhApiConfigValue<Double> getMultiverseSimilarityRequirement();
}
@@ -19,7 +19,8 @@
package com.seibel.lod.api.items.interfaces.config.client;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigGroup;
/**
* Distant Horizons' threading configuration.
@@ -27,7 +28,7 @@ import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiThreadingConfig
public interface IDhApiThreadingConfig extends IDhApiConfigGroup
{
/**
@@ -47,7 +48,7 @@ public interface IDhApiThreadingConfig
* count of threads and then a double percent active config.
*/
@Deprecated
IDhApiConfig<Double> getWorldGeneratorThreadConfig();
IDhApiConfigValue<Double> getWorldGeneratorThread();
// TODO the above should be replaced with these
// IDhApiConfig<Integer> getWorldGeneratorThreadConfig()
@@ -58,6 +59,6 @@ public interface IDhApiThreadingConfig
/** Defines how many buffer (GPU Terrain data) builder threads are used. */
IDhApiConfig<Integer> getBufferBuilderThreadConfig();
IDhApiConfigValue<Integer> getBufferBuilderThread();
}
@@ -1,5 +1,6 @@
package com.seibel.lod.core.interfaces.dependencyInjection;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.core.DependencyInjection.DhApiEventInjector;
/**
@@ -8,15 +9,24 @@ import com.seibel.lod.core.DependencyInjection.DhApiEventInjector;
* IE: this is how Core and the API talk to each other.
*
* @author James Seibel
* @version 2022-9-13
* @version 2022-9-15
*/
public class ApiCoreInjectors
{
private static ApiCoreInjectors INSTANCE;
public final IDhApiEventInjector eventInjector = new DhApiEventInjector();
public final IDhApiEventInjector events = new DhApiEventInjector();
/**
* <strong>WARNING:</strong> will be null until after DH initializes for the first time. <br><br>
*
* Use a {@link com.seibel.lod.api.methods.events.abstractEvents.DhApiAfterDhInitEvent DhApiAfterDhInitEvent}
* along with the {@link ApiCoreInjectors#events ApiCoreInjectors.events} to be notified when this can
* be safely used.
*/
public IDhApiConfig configs;
public static ApiCoreInjectors getInstance()
@@ -19,9 +19,9 @@
package com.seibel.lod.core.api.external.coreImplementations.methods.config.both;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.items.interfaces.config.both.IDhApiWorldGenerationConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfigValue;
import com.seibel.lod.core.config.Config.Client.WorldGenerator;
import com.seibel.lod.api.items.enums.config.EBlocksToAvoid;
import com.seibel.lod.api.items.enums.config.EDistanceGenerationMode;
@@ -38,32 +38,37 @@ import com.seibel.lod.api.items.enums.config.ELightGenerationMode;
*/
public class DhApiWorldGenerationConfig implements IDhApiWorldGenerationConfig
{
public static DhApiWorldGenerationConfig INSTANCE = new DhApiWorldGenerationConfig();
private DhApiWorldGenerationConfig() { }
@Override
public IDhApiConfig<Boolean> getEnableDistantWorldGenerationConfig()
{ return new DhApiConfig<>(WorldGenerator.enableDistantGeneration); }
public IDhApiConfigValue<Boolean> getEnableDistantWorldGeneration()
{ return new DhApiConfigValue<>(WorldGenerator.enableDistantGeneration); }
@Override
public IDhApiConfig<EDistanceGenerationMode> getDistantGeneratorDetailLevelConfig()
{ return new DhApiConfig<>(WorldGenerator.distanceGenerationMode); }
public IDhApiConfigValue<EDistanceGenerationMode> getDistantGeneratorDetailLevel()
{ return new DhApiConfigValue<>(WorldGenerator.distanceGenerationMode); }
@Override
public IDhApiConfig<ELightGenerationMode> getLightingModeConfig()
{ return new DhApiConfig<>(WorldGenerator.lightGenerationMode); }
public IDhApiConfigValue<ELightGenerationMode> getLightingMode()
{ return new DhApiConfigValue<>(WorldGenerator.lightGenerationMode); }
@Override
public IDhApiConfig<EGenerationPriority> getGenerationPriorityConfig()
{ return new DhApiConfig<>(WorldGenerator.generationPriority); }
public IDhApiConfigValue<EGenerationPriority> getGenerationPriority()
{ return new DhApiConfigValue<>(WorldGenerator.generationPriority); }
@Deprecated
@Override
public IDhApiConfig<EBlocksToAvoid> getBlocksToAvoidConfig()
{ return new DhApiConfig<>(WorldGenerator.blocksToAvoid); }
public IDhApiConfigValue<EBlocksToAvoid> getBlocksToAvoid()
{ return new DhApiConfigValue<>(WorldGenerator.blocksToAvoid); }
@Deprecated
@Override
public IDhApiConfig<Boolean> getTintWithAvoidedBlocksConfig()
{ return new DhApiConfig<>(WorldGenerator.tintWithAvoidedBlocks); }
public IDhApiConfigValue<Boolean> getTintWithAvoidedBlocks()
{ return new DhApiConfigValue<>(WorldGenerator.tintWithAvoidedBlocks); }
}
@@ -19,9 +19,9 @@
package com.seibel.lod.core.api.external.coreImplementations.methods.config.client;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.items.interfaces.config.client.IDhApiBuffersConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfigValue;
import com.seibel.lod.core.config.Config.Client.Advanced.Buffers;
import com.seibel.lod.api.items.enums.config.EGpuUploadMethod;
@@ -33,11 +33,16 @@ import com.seibel.lod.api.items.enums.config.EGpuUploadMethod;
*/
public class DhApiBuffersConfig implements IDhApiBuffersConfig
{
public static DhApiBuffersConfig INSTANCE = new DhApiBuffersConfig();
public IDhApiConfig<EGpuUploadMethod> getGpuUploadMethodConfig()
{ return new DhApiConfig<>(Buffers.gpuUploadMethod); }
private DhApiBuffersConfig() { }
public IDhApiConfig<Integer> getBufferUploadTimeoutPerMegabyteInMillisecondsConfig()
{ return new DhApiConfig<>(Buffers.gpuUploadPerMegabyteInMilliseconds); }
public IDhApiConfigValue<EGpuUploadMethod> getGpuUploadMethod()
{ return new DhApiConfigValue<>(Buffers.gpuUploadMethod); }
public IDhApiConfigValue<Integer> getBufferUploadTimeoutPerMegabyteInMilliseconds()
{ return new DhApiConfigValue<>(Buffers.gpuUploadPerMegabyteInMilliseconds); }
}
@@ -19,9 +19,9 @@
package com.seibel.lod.core.api.external.coreImplementations.methods.config.client;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.items.interfaces.config.client.IDhApiDebuggingConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfigValue;
import com.seibel.lod.core.config.Config.Client.Advanced.Debugging;
import com.seibel.lod.api.items.enums.rendering.EDebugMode;
@@ -33,11 +33,16 @@ import com.seibel.lod.api.items.enums.rendering.EDebugMode;
*/
public class DhApiDebuggingConfig implements IDhApiDebuggingConfig
{
public static DhApiDebuggingConfig INSTANCE = new DhApiDebuggingConfig();
public IDhApiConfig<EDebugMode> getDebugRenderModeConfig()
{ return new DhApiConfig<>(Debugging.debugMode); }
private DhApiDebuggingConfig() { }
public IDhApiConfig<Boolean> getEnableDebugKeybindingsConfig()
{ return new DhApiConfig<>(Debugging.enableDebugKeybindings); }
public IDhApiConfigValue<EDebugMode> getDebugRenderMode()
{ return new DhApiConfigValue<>(Debugging.debugMode); }
public IDhApiConfigValue<Boolean> getEnableDebugKeybindings()
{ return new DhApiConfigValue<>(Debugging.enableDebugKeybindings); }
}
@@ -20,9 +20,9 @@
package com.seibel.lod.core.api.external.coreImplementations.methods.config.client;
import com.seibel.lod.api.items.enums.config.*;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.items.interfaces.config.client.IDhApiGraphicsConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfigValue;
import com.seibel.lod.core.interfaces.config.converters.RenderModeEnabledConverter;
import com.seibel.lod.core.config.Config;
import com.seibel.lod.api.items.enums.rendering.ERendererMode;
@@ -38,22 +38,27 @@ import com.seibel.lod.core.config.Config.Client.Graphics.AdvancedGraphics;
*/
public class DhApiGraphicsConfig implements IDhApiGraphicsConfig
{
public static DhApiGraphicsConfig INSTANCE = new DhApiGraphicsConfig();
private DhApiGraphicsConfig() { }
//========================//
// basic graphic settings //
//========================//
@Override
public IDhApiConfig<Integer> getChunkRenderDistanceConfig()
{ return new DhApiConfig<>(Quality.lodChunkRenderDistance); }
public IDhApiConfigValue<Integer> getChunkRenderDistance()
{ return new DhApiConfigValue<>(Quality.lodChunkRenderDistance); }
@Override
public IDhApiConfig<Boolean> getRenderingEnabledConfig()
{ return new DhApiConfig<ERendererMode, Boolean>(Debugging.rendererMode, new RenderModeEnabledConverter()); }
public IDhApiConfigValue<Boolean> getRenderingEnabled()
{ return new DhApiConfigValue<ERendererMode, Boolean>(Debugging.rendererMode, new RenderModeEnabledConverter()); }
@Override
public IDhApiConfig<ERendererMode> getRenderingModeConfig()
{ return new DhApiConfig<>(Debugging.rendererMode); }
public IDhApiConfigValue<ERendererMode> getRenderingMode()
{ return new DhApiConfigValue<>(Debugging.rendererMode); }
@@ -62,20 +67,20 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig
//==================//
@Override
public IDhApiConfig<EHorizontalResolution> getMaxDetailLevelConfig()
{ return new DhApiConfig<>(Quality.drawResolution); }
public IDhApiConfigValue<EHorizontalResolution> getMaxDetailLevel()
{ return new DhApiConfigValue<>(Quality.drawResolution); }
@Override
public IDhApiConfig<EVerticalQuality> getVerticalQualityConfig()
{ return new DhApiConfig<>(Quality.verticalQuality); }
public IDhApiConfigValue<EVerticalQuality> getVerticalQuality()
{ return new DhApiConfigValue<>(Quality.verticalQuality); }
@Override
public IDhApiConfig<EHorizontalQuality> getHorizontalQualityDropoffConfig()
{ return new DhApiConfig<>(Quality.horizontalQuality); }
public IDhApiConfigValue<EHorizontalQuality> getHorizontalQualityDropoff()
{ return new DhApiConfigValue<>(Quality.horizontalQuality); }
@Override
public IDhApiConfig<Integer> getBiomeBlendingConfig()
{ return new DhApiConfig<>(Quality.lodBiomeBlending); }
public IDhApiConfigValue<Integer> getBiomeBlending()
{ return new DhApiConfigValue<>(Quality.lodBiomeBlending); }
@@ -84,48 +89,48 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig
//===========================//
@Override
public IDhApiConfig<Boolean> getDisableDirectionalCullingConfig()
{ return new DhApiConfig<>(AdvancedGraphics.disableDirectionalCulling); }
public IDhApiConfigValue<Boolean> getDisableDirectionalCulling()
{ return new DhApiConfigValue<>(AdvancedGraphics.disableDirectionalCulling); }
@Override
public IDhApiConfig<EVanillaOverdraw> getVanillaOverdrawConfig()
{ return new DhApiConfig<>(AdvancedGraphics.vanillaOverdraw); }
public IDhApiConfigValue<EVanillaOverdraw> getVanillaOverdraw()
{ return new DhApiConfigValue<>(AdvancedGraphics.vanillaOverdraw); }
@Override
public IDhApiConfig<Integer> getVanillaOverdrawOffsetConfig()
{ return new DhApiConfig<>(AdvancedGraphics.overdrawOffset); }
public IDhApiConfigValue<Integer> getVanillaOverdrawOffset()
{ return new DhApiConfigValue<>(AdvancedGraphics.overdrawOffset); }
@Override
public IDhApiConfig<Boolean> getUseExtendedNearClipPlaneConfig()
{ return new DhApiConfig<>(AdvancedGraphics.useExtendedNearClipPlane); }
public IDhApiConfigValue<Boolean> getUseExtendedNearClipPlane()
{ return new DhApiConfigValue<>(AdvancedGraphics.useExtendedNearClipPlane); }
@Override
public IDhApiConfig<Double> getBrightnessMultiplierConfig()
{ return new DhApiConfig<>(AdvancedGraphics.brightnessMultiplier); }
public IDhApiConfigValue<Double> getBrightnessMultiplier()
{ return new DhApiConfigValue<>(AdvancedGraphics.brightnessMultiplier); }
@Override
public IDhApiConfig<Double> getSaturationMultiplierConfig()
{ return new DhApiConfig<>(AdvancedGraphics.saturationMultiplier); }
public IDhApiConfigValue<Double> getSaturationMultiplier()
{ return new DhApiConfigValue<>(AdvancedGraphics.saturationMultiplier); }
@Override
public IDhApiConfig<Boolean> getCaveCullingEnabledConfig()
{ return new DhApiConfig<>(AdvancedGraphics.enableCaveCulling); }
public IDhApiConfigValue<Boolean> getCaveCullingEnabled()
{ return new DhApiConfigValue<>(AdvancedGraphics.enableCaveCulling); }
@Override
public IDhApiConfig<Integer> getCaveCullingHeightConfig()
{ return new DhApiConfig<>(AdvancedGraphics.caveCullingHeight); }
public IDhApiConfigValue<Integer> getCaveCullingHeight()
{ return new DhApiConfigValue<>(AdvancedGraphics.caveCullingHeight); }
@Override
public IDhApiConfig<Integer> getEarthCurvatureRatioConfig()
{ return new DhApiConfig<>(AdvancedGraphics.earthCurveRatio); }
public IDhApiConfigValue<Integer> getEarthCurvatureRatio()
{ return new DhApiConfigValue<>(AdvancedGraphics.earthCurveRatio); }
@Override
public IDhApiConfig<Boolean> getEnableLodOnlyModeConfig()
{ return new DhApiConfig<>(Config.Client.Advanced.lodOnlyMode); }
public IDhApiConfigValue<Boolean> getEnableLodOnlyMode()
{ return new DhApiConfigValue<>(Config.Client.Advanced.lodOnlyMode); }
@Override
public IDhApiConfig<EBufferRebuildTimes> getGeometryRebuildFrequencyConfig()
{ return new DhApiConfig<>(Config.Client.Advanced.Buffers.rebuildTimes); }
public IDhApiConfigValue<EBufferRebuildTimes> getGeometryRebuildFrequency()
{ return new DhApiConfigValue<>(Config.Client.Advanced.Buffers.rebuildTimes); }
@@ -20,9 +20,9 @@
package com.seibel.lod.core.api.external.coreImplementations.methods.config.client;
import com.seibel.lod.api.items.enums.rendering.*;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.items.interfaces.config.client.IDhApiGraphicsFogConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfigValue;
import com.seibel.lod.core.config.Config.Client.Graphics.FogQuality;
/**
@@ -37,26 +37,31 @@ import com.seibel.lod.core.config.Config.Client.Graphics.FogQuality;
*/
public class DhApiGraphicsFogConfig implements IDhApiGraphicsFogConfig
{
public static DhApiGraphicsFogConfig INSTANCE = new DhApiGraphicsFogConfig();
private DhApiGraphicsFogConfig() { }
//====================//
// basic fog settings //
//====================//
@Override
public IDhApiConfig<EFogDistance> getFogDistanceConfig()
{ return new DhApiConfig<>(FogQuality.fogDistance); }
public IDhApiConfigValue<EFogDistance> getFogDistance()
{ return new DhApiConfigValue<>(FogQuality.fogDistance); }
@Override
public IDhApiConfig<EFogDrawMode> getFogRenderConfig()
{ return new DhApiConfig<>(FogQuality.fogDrawMode); }
public IDhApiConfigValue<EFogDrawMode> getFogRender()
{ return new DhApiConfigValue<>(FogQuality.fogDrawMode); }
@Override
public IDhApiConfig<EFogColorMode> getFogColorConfig()
{ return new DhApiConfig<>(FogQuality.fogColorMode); }
public IDhApiConfigValue<EFogColorMode> getFogColor()
{ return new DhApiConfigValue<>(FogQuality.fogColorMode); }
@Override
public IDhApiConfig<Boolean> getDisableVanillaFogConfig()
{ return new DhApiConfig<>(FogQuality.disableVanillaFog); }
public IDhApiConfigValue<Boolean> getDisableVanillaFog()
{ return new DhApiConfigValue<>(FogQuality.disableVanillaFog); }
//=======================//
@@ -64,28 +69,28 @@ public class DhApiGraphicsFogConfig implements IDhApiGraphicsFogConfig
//=======================//
@Override
public IDhApiConfig<Double> getFogStartDistanceConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.farFogStart); }
public IDhApiConfigValue<Double> getFogStartDistance()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogStart); }
@Override
public IDhApiConfig<Double> getFogEndDistanceConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.farFogEnd); }
public IDhApiConfigValue<Double> getFogEndDistance()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogEnd); }
@Override
public IDhApiConfig<Double> getFogMinThicknessConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.farFogMin); }
public IDhApiConfigValue<Double> getFogMinThickness()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogMin); }
@Override
public IDhApiConfig<Double> getFogMaxThicknessConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.farFogMax); }
public IDhApiConfigValue<Double> getFogMaxThickness()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogMax); }
@Override
public IDhApiConfig<EFogFalloff> getFogFalloffConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.farFogType); }
public IDhApiConfigValue<EFogFalloff> getFogFalloff()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogType); }
@Override
public IDhApiConfig<Double> getFogDensityConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.farFogDensity); }
public IDhApiConfigValue<Double> getFogDensity()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogDensity); }
//=====================//
@@ -93,39 +98,39 @@ public class DhApiGraphicsFogConfig implements IDhApiGraphicsFogConfig
//=====================//
@Override
public IDhApiConfig<EHeightFogMixMode> getHeightFogMixModeConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.HeightFog.heightFogMixMode); }
public IDhApiConfigValue<EHeightFogMixMode> getHeightFogMixMode()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogMixMode); }
@Override
public IDhApiConfig<EHeightFogMode> getHeightFogModeConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.HeightFog.heightFogMode); }
public IDhApiConfigValue<EHeightFogMode> getHeightFogMode()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogMode); }
@Override
public IDhApiConfig<Double> getHeightFogBaseHeightConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.HeightFog.heightFogHeight); }
public IDhApiConfigValue<Double> getHeightFogBaseHeight()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogHeight); }
@Override
public IDhApiConfig<Double> getHeightFogStartingHeightPercentConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.HeightFog.heightFogStart); }
public IDhApiConfigValue<Double> getHeightFogStartingHeightPercent()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogStart); }
@Override
public IDhApiConfig<Double> getHeightFogEndingHeightPercentConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.HeightFog.heightFogEnd); }
public IDhApiConfigValue<Double> getHeightFogEndingHeightPercent()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogEnd); }
@Override
public IDhApiConfig<Double> getHeightFogMinThicknessConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.HeightFog.heightFogMin); }
public IDhApiConfigValue<Double> getHeightFogMinThickness()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogMin); }
@Override
public IDhApiConfig<Double> getHeightFogMaxThicknessConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.HeightFog.heightFogMax); }
public IDhApiConfigValue<Double> getHeightFogMaxThickness()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogMax); }
@Override
public IDhApiConfig<EFogFalloff> getHeightFogFalloffConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.HeightFog.heightFogType); }
public IDhApiConfigValue<EFogFalloff> getHeightFogFalloff()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogType); }
@Override
public IDhApiConfig<Double> getHeightFogDensityConfig()
{ return new DhApiConfig<>(FogQuality.AdvancedFog.HeightFog.heightFogDensity); }
public IDhApiConfigValue<Double> getHeightFogDensity()
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogDensity); }
}
@@ -19,9 +19,9 @@
package com.seibel.lod.core.api.external.coreImplementations.methods.config.client;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.items.interfaces.config.client.IDhApiMultiplayerConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfigValue;
import com.seibel.lod.core.config.Config.Client.Multiplayer;
import com.seibel.lod.api.items.enums.config.EServerFolderNameMode;
@@ -33,11 +33,16 @@ import com.seibel.lod.api.items.enums.config.EServerFolderNameMode;
*/
public class DhApiMultiplayerConfig implements IDhApiMultiplayerConfig
{
public static DhApiMultiplayerConfig INSTANCE = new DhApiMultiplayerConfig();
public IDhApiConfig<EServerFolderNameMode> getFolderSavingModeConfig()
{ return new DhApiConfig<>(Multiplayer.serverFolderNameMode); }
private DhApiMultiplayerConfig() { }
public IDhApiConfig<Double> getMultiverseSimilarityRequirementConfig()
{ return new DhApiConfig<>(Multiplayer.multiDimensionRequiredSimilarity); }
public IDhApiConfigValue<EServerFolderNameMode> getFolderSavingMode()
{ return new DhApiConfigValue<>(Multiplayer.serverFolderNameMode); }
public IDhApiConfigValue<Double> getMultiverseSimilarityRequirement()
{ return new DhApiConfigValue<>(Multiplayer.multiDimensionRequiredSimilarity); }
}
@@ -19,9 +19,9 @@
package com.seibel.lod.core.api.external.coreImplementations.methods.config.client;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.items.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.items.interfaces.config.client.IDhApiThreadingConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfig;
import com.seibel.lod.api.items.objects.config.DhApiConfigValue;
import com.seibel.lod.core.config.Config.Client.Advanced.Threading;
/**
@@ -32,11 +32,16 @@ import com.seibel.lod.core.config.Config.Client.Advanced.Threading;
*/
public class DhApiThreadingConfig implements IDhApiThreadingConfig
{
public static DhApiThreadingConfig INSTANCE = new DhApiThreadingConfig();
private DhApiThreadingConfig() { }
@Deprecated
@Override
public IDhApiConfig<Double> getWorldGeneratorThreadConfig()
{ return new DhApiConfig<>(Threading.numberOfWorldGenerationThreads); }
public IDhApiConfigValue<Double> getWorldGeneratorThread()
{ return new DhApiConfigValue<>(Threading.numberOfWorldGenerationThreads); }
// TODO the above should be replaced with these
// public static IDhApiConfig<Integer> getWorldGeneratorThreadConfig()
@@ -46,7 +51,7 @@ public class DhApiThreadingConfig implements IDhApiThreadingConfig
// { return new DhApiConfig<>(Threading.ToBeDetermined); }
@Override
public IDhApiConfig<Integer> getBufferBuilderThreadConfig()
{ return new DhApiConfig<>(Threading.numberOfBufferBuilderThreads); }
public IDhApiConfigValue<Integer> getBufferBuilderThread()
{ return new DhApiConfigValue<>(Threading.numberOfBufferBuilderThreads); }
}