Overhaul the config and start adding summary options
also: - add DH vs MC lighting engine option - add a toggle for wireframe rendering
This commit is contained in:
@@ -24,7 +24,7 @@ package com.seibel.lod.api.enums.config;
|
||||
* FANCY,
|
||||
*
|
||||
* @author Leetom
|
||||
* @version 2022-7-1
|
||||
* @version 2023-6-7
|
||||
*/
|
||||
public enum ELightGenerationMode
|
||||
{
|
||||
@@ -32,9 +32,8 @@ public enum ELightGenerationMode
|
||||
// when adding items up the API minor version
|
||||
// when removing items up the API major version
|
||||
|
||||
/** Fake light values using a height map */
|
||||
FAST,
|
||||
DISTANT_HORIZONS,
|
||||
|
||||
MINECRAFT
|
||||
|
||||
/** Run the lighting engine though the chunk to generate proper light values */
|
||||
FANCY
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
package com.seibel.lod.api.enums.config;
|
||||
|
||||
/**
|
||||
* AUTO, <br>
|
||||
* NAME_ONLY, <br>
|
||||
* NAME_IP, <br>
|
||||
* NAME_IP_PORT, <br> <br>
|
||||
* NAME_IP_PORT, <br>
|
||||
* NAME_IP_PORT_MC_VERSION, <br> <br>
|
||||
*
|
||||
* Determines how the multiplayer folders should be named.
|
||||
*
|
||||
@@ -38,12 +38,6 @@ public enum EServerFolderNameMode
|
||||
// when removing items up the API major version
|
||||
|
||||
|
||||
/**
|
||||
* NAME_IP for LAN connections <Br>
|
||||
* NAME_IP_PORT for all others
|
||||
*/
|
||||
AUTO,
|
||||
|
||||
/** Only use the server name */
|
||||
NAME_ONLY,
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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.api.enums.config.quickOptions;
|
||||
|
||||
/**
|
||||
* CUSTOM, <br><br>
|
||||
*
|
||||
* MINIMUM, <br>
|
||||
* LOW, <br>
|
||||
* MEDIUM, <br>
|
||||
* HIGH, <br>
|
||||
* EXTREME, <br>
|
||||
*/
|
||||
public enum EQuickQuality
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
// when removing items up the API major version
|
||||
|
||||
CUSTOM,
|
||||
|
||||
MINIMUM,
|
||||
LOW,
|
||||
MEDIUM,
|
||||
HIGH,
|
||||
EXTREME;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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.api.enums.config.quickOptions;
|
||||
|
||||
/**
|
||||
* CUSTOM, <br><br>
|
||||
*
|
||||
* MINIMAL_IMPACT, <br>
|
||||
* LOW_IMPACT, <br>
|
||||
* BALANCED, <br>
|
||||
* FAST_LOADING, <br>
|
||||
* I_PAID_FOR_THE_WHOLE_CPU, <br>
|
||||
*/
|
||||
public enum EQuickThread
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items up the API minor version
|
||||
// when removing items up the API major version
|
||||
|
||||
CUSTOM,
|
||||
|
||||
MINIMAL_IMPACT,
|
||||
LOW_IMPACT,
|
||||
BALANCED,
|
||||
FAST_LOADING,
|
||||
I_PAID_FOR_THE_WHOLE_CPU;
|
||||
|
||||
}
|
||||
@@ -20,20 +20,15 @@
|
||||
package com.seibel.lod.api.enums.rendering;
|
||||
|
||||
/**
|
||||
* OFF, <br>
|
||||
* SHOW_WIREFRAME, <br>
|
||||
* SHOW_DETAIL, <br>
|
||||
* SHOW_DETAIL_WIREFRAME, <br>
|
||||
* SHOW_GENMODE, <br>
|
||||
* SHOW_GENMODE_WIREFRAME, <br>
|
||||
* SHOW_OVERLAPPING_QUADS, <br>
|
||||
* SHOW_OVERLAPPING_QUADS_WIREFRAME, <br>
|
||||
* SHOW_RENDER_SOURCE_FLAG, <br>
|
||||
* SHOW_RENDER_SOURCE_FLAG_WIREFRAME, <br>
|
||||
* OFF, <br>
|
||||
* SHOW_DETAIL, <br>
|
||||
* SHOW_GENMODE, <br>
|
||||
* SHOW_OVERLAPPING_QUADS, <br>
|
||||
* SHOW_RENDER_SOURCE_FLAG, <br>
|
||||
*
|
||||
* @author Leetom
|
||||
* @author James Seibel
|
||||
* @version 2022-7-2
|
||||
* @version 2023-6-7
|
||||
*/
|
||||
public enum EDebugMode
|
||||
{
|
||||
@@ -44,68 +39,40 @@ public enum EDebugMode
|
||||
|
||||
/** LODs are rendered normally */
|
||||
OFF,
|
||||
|
||||
/** LOD draws in wireframe. */
|
||||
SHOW_WIREFRAME,
|
||||
|
||||
/** LOD colors are based on their detail */
|
||||
SHOW_DETAIL,
|
||||
|
||||
/** LOD colors are based on their detail, and draws in wireframe. */
|
||||
SHOW_DETAIL_WIREFRAME,
|
||||
|
||||
/** LOD colors are based on their gen mode. */
|
||||
SHOW_GENMODE,
|
||||
|
||||
/** LOD colors are based on their gen mode, and draws in wireframe. */
|
||||
SHOW_GENMODE_WIREFRAME,
|
||||
|
||||
/** Only draw overlapping LOD quads. */
|
||||
SHOW_OVERLAPPING_QUADS,
|
||||
|
||||
/** Only draw overlapping LOD quads, and draws in wireframe. */
|
||||
SHOW_OVERLAPPING_QUADS_WIREFRAME,
|
||||
|
||||
|
||||
/** LOD colors are based on renderSource flags. */
|
||||
SHOW_RENDER_SOURCE_FLAG,
|
||||
|
||||
/** LOD colors are based on renderSource flags, and draws in wireframe. */
|
||||
SHOW_RENDER_SOURCE_FLAG_WIREFRAME;
|
||||
|
||||
/** returns the next debug mode */
|
||||
// Deprecated: use DebugMode.next() instead
|
||||
@Deprecated
|
||||
public EDebugMode getNext()
|
||||
SHOW_RENDER_SOURCE_FLAG;
|
||||
|
||||
|
||||
public static EDebugMode next(EDebugMode type)
|
||||
{
|
||||
return next(this);
|
||||
}
|
||||
|
||||
public static EDebugMode next(EDebugMode type) {
|
||||
switch (type) {
|
||||
case OFF: return SHOW_WIREFRAME;
|
||||
case SHOW_WIREFRAME: return SHOW_DETAIL;
|
||||
case SHOW_DETAIL: return SHOW_DETAIL_WIREFRAME;
|
||||
case SHOW_DETAIL_WIREFRAME: return SHOW_GENMODE;
|
||||
case SHOW_GENMODE: return SHOW_GENMODE_WIREFRAME;
|
||||
case SHOW_GENMODE_WIREFRAME: return SHOW_OVERLAPPING_QUADS;
|
||||
case SHOW_OVERLAPPING_QUADS: return SHOW_OVERLAPPING_QUADS_WIREFRAME;
|
||||
case SHOW_OVERLAPPING_QUADS_WIREFRAME: return SHOW_RENDER_SOURCE_FLAG;
|
||||
case SHOW_RENDER_SOURCE_FLAG: return SHOW_RENDER_SOURCE_FLAG_WIREFRAME;
|
||||
switch (type)
|
||||
{
|
||||
case OFF: return SHOW_DETAIL;
|
||||
case SHOW_DETAIL: return SHOW_GENMODE;
|
||||
case SHOW_GENMODE: return SHOW_OVERLAPPING_QUADS;
|
||||
case SHOW_OVERLAPPING_QUADS: return SHOW_RENDER_SOURCE_FLAG;
|
||||
default: return OFF;
|
||||
}
|
||||
}
|
||||
|
||||
public static EDebugMode previous(EDebugMode type) {
|
||||
switch (type) {
|
||||
case OFF: return SHOW_RENDER_SOURCE_FLAG_WIREFRAME;
|
||||
case SHOW_RENDER_SOURCE_FLAG_WIREFRAME: return SHOW_RENDER_SOURCE_FLAG;
|
||||
case SHOW_RENDER_SOURCE_FLAG: return SHOW_OVERLAPPING_QUADS_WIREFRAME;
|
||||
case SHOW_OVERLAPPING_QUADS_WIREFRAME: return SHOW_OVERLAPPING_QUADS;
|
||||
case SHOW_OVERLAPPING_QUADS: return SHOW_GENMODE_WIREFRAME;
|
||||
case SHOW_GENMODE_WIREFRAME: return SHOW_GENMODE;
|
||||
case SHOW_GENMODE: return SHOW_DETAIL_WIREFRAME;
|
||||
case SHOW_DETAIL_WIREFRAME: return SHOW_DETAIL;
|
||||
case SHOW_DETAIL: return SHOW_WIREFRAME;
|
||||
public static EDebugMode previous(EDebugMode type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case OFF: return SHOW_RENDER_SOURCE_FLAG;
|
||||
case SHOW_RENDER_SOURCE_FLAG: return SHOW_OVERLAPPING_QUADS;
|
||||
case SHOW_OVERLAPPING_QUADS: return SHOW_GENMODE;
|
||||
case SHOW_GENMODE: return SHOW_DETAIL;
|
||||
default: return OFF;
|
||||
}
|
||||
}
|
||||
|
||||
-6
@@ -46,12 +46,6 @@ public interface IDhApiWorldGenerationConfig extends IDhApiConfigGroup
|
||||
/** Defines to what level fake chunks will be generated. */
|
||||
IDhApiConfigValue<EDhApiDistantGeneratorMode> getDistantGeneratorMode();
|
||||
|
||||
/** Defines how generated fake chunks will be lit. */
|
||||
IDhApiConfigValue<ELightGenerationMode> getLightingMode();
|
||||
|
||||
/** Defines the order in which fake chunks will be generated. */
|
||||
IDhApiConfigValue<EGenerationPriority> getGenerationPriority();
|
||||
|
||||
/**
|
||||
* Defines what blocks will be ignored when generating LODs. <br><br>
|
||||
*
|
||||
|
||||
+1
-13
@@ -81,7 +81,7 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
|
||||
* 2 = blending of 5x5 <br>
|
||||
* ... <br>
|
||||
*/
|
||||
IDhApiConfigValue<Integer> getBiomeBlending();
|
||||
// IDhApiConfigValue<Integer> getBiomeBlending();
|
||||
|
||||
|
||||
|
||||
@@ -89,15 +89,6 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
|
||||
// advanced graphic settings //
|
||||
//===========================//
|
||||
|
||||
/** If directional culling is disabled fake chunks will be rendered behind the camera. */
|
||||
IDhApiConfigValue<Boolean> getDisableDirectionalCulling();
|
||||
|
||||
/** Determines how fake chunks are rendered in comparison to vanilla MC's chunks. */
|
||||
IDhApiConfigValue<EVanillaOverdraw> getVanillaOverdraw();
|
||||
|
||||
/** Modifies how far the vanilla overdraw is rendered in chunks. */
|
||||
IDhApiConfigValue<Integer> getVanillaOverdrawOffset();
|
||||
|
||||
/**
|
||||
* If enabled the near clip plane is extended to reduce
|
||||
* overdraw and improve Z-fighting at extreme render distances. <br>
|
||||
@@ -130,9 +121,6 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
|
||||
/** If enabled vanilla chunk rendering is disabled and only fake chunks are rendered. */
|
||||
IDhApiConfigValue<Boolean> getEnableLodOnlyMode();
|
||||
|
||||
/** Defines how often the geometry should be rebuilt when the player moves. */
|
||||
IDhApiConfigValue<EBufferRebuildTimes> getGeometryRebuildFrequency();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ public interface IDhApiGraphicsFogConfig extends IDhApiConfigGroup
|
||||
IDhApiConfigValue<Double> getFogMaxThickness();
|
||||
|
||||
/** Defines how the fog changes in thickness. */
|
||||
IDhApiConfigValue<EFogFalloff> getFogFalloff();
|
||||
IDhApiConfigValue<EFogFalloff> getFarFogFalloff();
|
||||
|
||||
/** Defines the fog density. */
|
||||
IDhApiConfigValue<Double> getFogDensity();
|
||||
|
||||
+1
-9
@@ -22,7 +22,7 @@ package com.seibel.lod.core.api.external.methods.config.both;
|
||||
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
|
||||
import com.seibel.lod.api.interfaces.config.both.IDhApiWorldGenerationConfig;
|
||||
import com.seibel.lod.api.objects.config.DhApiConfigValue;
|
||||
import com.seibel.lod.core.config.Config.Client.WorldGenerator;
|
||||
import com.seibel.lod.core.config.Config.Client.Advanced.WorldGenerator;
|
||||
import com.seibel.lod.api.enums.config.EBlocksToAvoid;
|
||||
import com.seibel.lod.api.enums.worldGeneration.EDhApiDistantGeneratorMode;
|
||||
import com.seibel.lod.api.enums.config.EGenerationPriority;
|
||||
@@ -52,14 +52,6 @@ public class DhApiWorldGenerationConfig implements IDhApiWorldGenerationConfig
|
||||
public IDhApiConfigValue<EDhApiDistantGeneratorMode> getDistantGeneratorMode()
|
||||
{ return new DhApiConfigValue<>(WorldGenerator.distantGeneratorMode); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<ELightGenerationMode> getLightingMode()
|
||||
{ return new DhApiConfigValue<>(WorldGenerator.lightGenerationMode); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<EGenerationPriority> getGenerationPriority()
|
||||
{ return new DhApiConfigValue<>(WorldGenerator.generationPriority); }
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public IDhApiConfigValue<EBlocksToAvoid> getBlocksToAvoid()
|
||||
|
||||
Vendored
+4
-3
@@ -22,7 +22,8 @@ package com.seibel.lod.core.api.external.methods.config.client;
|
||||
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
|
||||
import com.seibel.lod.api.interfaces.config.client.IDhApiBuffersConfig;
|
||||
import com.seibel.lod.api.objects.config.DhApiConfigValue;
|
||||
import com.seibel.lod.core.config.Config.Client.Advanced.Buffers;
|
||||
import com.seibel.lod.core.config.Config;
|
||||
import com.seibel.lod.core.config.Config.Client.Advanced.GpuBuffers;
|
||||
import com.seibel.lod.api.enums.config.EGpuUploadMethod;
|
||||
|
||||
/**
|
||||
@@ -40,9 +41,9 @@ public class DhApiBuffersConfig implements IDhApiBuffersConfig
|
||||
|
||||
|
||||
public IDhApiConfigValue<EGpuUploadMethod> getGpuUploadMethod()
|
||||
{ return new DhApiConfigValue<>(Buffers.gpuUploadMethod); }
|
||||
{ return new DhApiConfigValue<>(Config.Client.Advanced.GpuBuffers.gpuUploadMethod); }
|
||||
|
||||
public IDhApiConfigValue<Integer> getBufferUploadTimeoutPerMegabyteInMilliseconds()
|
||||
{ return new DhApiConfigValue<>(Buffers.gpuUploadPerMegabyteInMilliseconds); }
|
||||
{ return new DhApiConfigValue<>(GpuBuffers.gpuUploadPerMegabyteInMilliseconds); }
|
||||
|
||||
}
|
||||
|
||||
Vendored
+9
-21
@@ -26,9 +26,9 @@ import com.seibel.lod.api.objects.config.DhApiConfigValue;
|
||||
import com.seibel.lod.coreapi.util.converters.RenderModeEnabledConverter;
|
||||
import com.seibel.lod.core.config.Config;
|
||||
import com.seibel.lod.api.enums.rendering.ERendererMode;
|
||||
import com.seibel.lod.core.config.Config.Client.Graphics.Quality;
|
||||
import com.seibel.lod.core.config.Config.Client.Advanced.Graphics.Quality;
|
||||
import com.seibel.lod.core.config.Config.Client.Advanced.Debugging;
|
||||
import com.seibel.lod.core.config.Config.Client.Graphics.AdvancedGraphics;
|
||||
import com.seibel.lod.core.config.Config.Client.Advanced.Graphics.AdvancedGraphics;
|
||||
|
||||
/**
|
||||
* Distant Horizons' graphics/rendering configuration.
|
||||
@@ -78,9 +78,9 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig
|
||||
public IDhApiConfigValue<EHorizontalQuality> getHorizontalQualityDropoff()
|
||||
{ return new DhApiConfigValue<>(Quality.horizontalQuality); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Integer> getBiomeBlending()
|
||||
{ return new DhApiConfigValue<>(Quality.lodBiomeBlending); }
|
||||
// @Override
|
||||
// public IDhApiConfigValue<Integer> getBiomeBlending()
|
||||
// { return new DhApiConfigValue<>(Quality.lodBiomeBlending); }
|
||||
|
||||
|
||||
|
||||
@@ -88,17 +88,9 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig
|
||||
// advanced graphic settings //
|
||||
//===========================//
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Boolean> getDisableDirectionalCulling()
|
||||
{ return new DhApiConfigValue<>(AdvancedGraphics.disableDirectionalCulling); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<EVanillaOverdraw> getVanillaOverdraw()
|
||||
{ return new DhApiConfigValue<>(AdvancedGraphics.vanillaOverdraw); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Integer> getVanillaOverdrawOffset()
|
||||
{ return new DhApiConfigValue<>(AdvancedGraphics.overdrawOffset); }
|
||||
// @Override
|
||||
// public IDhApiConfigValue<Boolean> getDisableDirectionalCulling()
|
||||
// { return new DhApiConfigValue<>(AdvancedGraphics.disableDirectionalCulling); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Boolean> getUseExtendedNearClipPlane()
|
||||
@@ -126,11 +118,7 @@ public class DhApiGraphicsConfig implements IDhApiGraphicsConfig
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Boolean> getEnableLodOnlyMode()
|
||||
{ return new DhApiConfigValue<>(Config.Client.Advanced.lodOnlyMode); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<EBufferRebuildTimes> getGeometryRebuildFrequency()
|
||||
{ return new DhApiConfigValue<>(Config.Client.Advanced.Buffers.rebuildTimes); }
|
||||
{ return new DhApiConfigValue<>(Debugging.lodOnlyMode); }
|
||||
|
||||
|
||||
|
||||
|
||||
+21
-21
@@ -23,7 +23,7 @@ import com.seibel.lod.api.enums.rendering.*;
|
||||
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
|
||||
import com.seibel.lod.api.interfaces.config.client.IDhApiGraphicsFogConfig;
|
||||
import com.seibel.lod.api.objects.config.DhApiConfigValue;
|
||||
import com.seibel.lod.core.config.Config.Client.Graphics.FogQuality;
|
||||
import com.seibel.lod.core.config.Config.Client.Advanced.Graphics.Fog;
|
||||
|
||||
/**
|
||||
* Distant Horizons' fog configuration. <br><br>
|
||||
@@ -49,19 +49,19 @@ public class DhApiGraphicsFogConfig implements IDhApiGraphicsFogConfig
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<EFogDistance> getFogDistance()
|
||||
{ return new DhApiConfigValue<>(FogQuality.fogDistance); }
|
||||
{ return new DhApiConfigValue<>(Fog.fogDistance); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<EFogDrawMode> getFogRender()
|
||||
{ return new DhApiConfigValue<>(FogQuality.fogDrawMode); }
|
||||
{ return new DhApiConfigValue<>(Fog.fogDrawMode); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<EFogColorMode> getFogColor()
|
||||
{ return new DhApiConfigValue<>(FogQuality.fogColorMode); }
|
||||
{ return new DhApiConfigValue<>(Fog.fogColorMode); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Boolean> getDisableVanillaFog()
|
||||
{ return new DhApiConfigValue<>(FogQuality.disableVanillaFog); }
|
||||
{ return new DhApiConfigValue<>(Fog.disableVanillaFog); }
|
||||
|
||||
|
||||
//=======================//
|
||||
@@ -70,27 +70,27 @@ public class DhApiGraphicsFogConfig implements IDhApiGraphicsFogConfig
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Double> getFogStartDistance()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogStart); }
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.farFogStart); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Double> getFogEndDistance()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogEnd); }
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.farFogEnd); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Double> getFogMinThickness()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogMin); }
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.farFogMin); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Double> getFogMaxThickness()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogMax); }
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.farFogMax); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<EFogFalloff> getFogFalloff()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogType); }
|
||||
public IDhApiConfigValue<EFogFalloff> getFarFogFalloff()
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.farFogFalloff); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Double> getFogDensity()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.farFogDensity); }
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.farFogDensity); }
|
||||
|
||||
|
||||
//=====================//
|
||||
@@ -99,38 +99,38 @@ public class DhApiGraphicsFogConfig implements IDhApiGraphicsFogConfig
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<EHeightFogMixMode> getHeightFogMixMode()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogMixMode); }
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogMixMode); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<EHeightFogMode> getHeightFogMode()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogMode); }
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogMode); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Double> getHeightFogBaseHeight()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogHeight); }
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogHeight); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Double> getHeightFogStartingHeightPercent()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogStart); }
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogStart); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Double> getHeightFogEndingHeightPercent()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogEnd); }
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogEnd); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Double> getHeightFogMinThickness()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogMin); }
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogMin); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Double> getHeightFogMaxThickness()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogMax); }
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogMax); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<EFogFalloff> getHeightFogFalloff()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogType); }
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogFalloff); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Double> getHeightFogDensity()
|
||||
{ return new DhApiConfigValue<>(FogQuality.AdvancedFog.HeightFog.heightFogDensity); }
|
||||
{ return new DhApiConfigValue<>(Fog.AdvancedFog.HeightFog.heightFogDensity); }
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ package com.seibel.lod.core.api.external.methods.config.client;
|
||||
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
|
||||
import com.seibel.lod.api.interfaces.config.client.IDhApiMultiplayerConfig;
|
||||
import com.seibel.lod.api.objects.config.DhApiConfigValue;
|
||||
import com.seibel.lod.core.config.Config.Client.Multiplayer;
|
||||
import com.seibel.lod.core.config.Config.Client.Advanced.Multiplayer;
|
||||
import com.seibel.lod.api.enums.config.EServerFolderNameMode;
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+5
-5
@@ -22,7 +22,7 @@ package com.seibel.lod.core.api.external.methods.config.client;
|
||||
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
|
||||
import com.seibel.lod.api.interfaces.config.client.IDhApiThreadingConfig;
|
||||
import com.seibel.lod.api.objects.config.DhApiConfigValue;
|
||||
import com.seibel.lod.core.config.Config.Client.Advanced.Threading;
|
||||
import com.seibel.lod.core.config.Config.Client.Advanced.MultiThreading;
|
||||
|
||||
/**
|
||||
* Distant Horizons' threading configuration.
|
||||
@@ -40,18 +40,18 @@ public class DhApiThreadingConfig implements IDhApiThreadingConfig
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Integer> getWorldGeneratorThread()
|
||||
{ return new DhApiConfigValue<>(Threading.numberOfWorldGenerationThreads); }
|
||||
{ return new DhApiConfigValue<>(MultiThreading.numberOfWorldGenerationThreads); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Integer> getBufferBuilderThread()
|
||||
{ return new DhApiConfigValue<>(Threading.numberOfBufferBuilderThreads); }
|
||||
{ return new DhApiConfigValue<>(MultiThreading.numberOfBufferBuilderThreads); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Integer> getFileHandlerThread()
|
||||
{ return new DhApiConfigValue<>(Threading.numberOfFileHandlerThreads); }
|
||||
{ return new DhApiConfigValue<>(MultiThreading.numberOfFileHandlerThreads); }
|
||||
|
||||
@Override
|
||||
public IDhApiConfigValue<Integer> getDataConverterThread()
|
||||
{ return new DhApiConfigValue<>(Threading.numberOfDataConverterThreads); }
|
||||
{ return new DhApiConfigValue<>(MultiThreading.numberOfDataConverterThreads); }
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -40,14 +40,14 @@ public class RenderCacheConfigEventHandler implements IConfigListener
|
||||
boolean refreshRenderData = false;
|
||||
|
||||
|
||||
EVerticalQuality newVerticalQuality = Config.Client.Graphics.Quality.verticalQuality.get();
|
||||
EVerticalQuality newVerticalQuality = Config.Client.Advanced.Graphics.Quality.verticalQuality.get();
|
||||
if (this.previousVerticalQualitySetting != newVerticalQuality)
|
||||
{
|
||||
this.previousVerticalQualitySetting = newVerticalQuality;
|
||||
refreshRenderData = true;
|
||||
}
|
||||
|
||||
EHorizontalResolution newHorizontalResolution = Config.Client.Graphics.Quality.drawResolution.get();
|
||||
EHorizontalResolution newHorizontalResolution = Config.Client.Advanced.Graphics.Quality.drawResolution.get();
|
||||
if (this.previousHorizontalResolution != newHorizontalResolution)
|
||||
{
|
||||
this.previousHorizontalResolution = newHorizontalResolution;
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.seibel.lod.core.config.types.enums.ConfigEntryAppearance;
|
||||
*/
|
||||
public class ConfigLinkedEntry extends AbstractConfigType<AbstractConfigType, ConfigLinkedEntry> {
|
||||
public ConfigLinkedEntry(AbstractConfigType value) {
|
||||
super(ConfigEntryAppearance.ONLY_SHOW, value);
|
||||
super(ConfigEntryAppearance.ONLY_IN_GUI, value);
|
||||
}
|
||||
|
||||
/** Appearance shouldn't be changed */
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.seibel.lod.core.config.types.enums.ConfigEntryAppearance;
|
||||
*/
|
||||
public class ConfigUIComment extends AbstractConfigType<String, ConfigUIComment>{
|
||||
public ConfigUIComment() {
|
||||
super(ConfigEntryAppearance.ONLY_SHOW, "");
|
||||
super(ConfigEntryAppearance.ONLY_IN_GUI, "");
|
||||
}
|
||||
|
||||
/** Appearance shouldn't be changed */
|
||||
|
||||
+4
-2
@@ -6,11 +6,12 @@ package com.seibel.lod.core.config.types.enums;
|
||||
*
|
||||
* @author coolGi
|
||||
*/
|
||||
public enum ConfigEntryAppearance {
|
||||
public enum ConfigEntryAppearance
|
||||
{
|
||||
/** Defeat option */
|
||||
ALL(true, true),
|
||||
/** Will only show the option in the UI. The option will be reverted on game restart */
|
||||
ONLY_SHOW(true, false),
|
||||
ONLY_IN_GUI(true, false),
|
||||
/** Only show the option in the file. There would be no way to access it using the UI */
|
||||
ONLY_IN_FILE(true, false);
|
||||
|
||||
@@ -18,6 +19,7 @@ public enum ConfigEntryAppearance {
|
||||
public final boolean showInGui;
|
||||
/** Sets whether to save an option, <br> If set to false, the option will be reset on game restart */
|
||||
public final boolean showInFile;
|
||||
|
||||
ConfigEntryAppearance(boolean showInGui, boolean showInFile) { // If both are false then the config won't touch the option, but it would still be accessable if explicitly called
|
||||
this.showInGui = showInGui;
|
||||
this.showInFile = showInFile;
|
||||
|
||||
+1
-1
@@ -252,7 +252,7 @@ public final class BufferQuad
|
||||
|
||||
// quad width should only be limited when earth curvature is enabled
|
||||
int maxQuadWidth = NORMAL_MAX_QUAD_WIDTH;
|
||||
if (Config.Client.Graphics.AdvancedGraphics.earthCurveRatio.get() != 0)
|
||||
if (Config.Client.Advanced.Graphics.AdvancedGraphics.earthCurveRatio.get() != 0)
|
||||
{
|
||||
maxQuadWidth = MAX_QUAD_WIDTH_FOR_EARTH_CURVATURE;
|
||||
}
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ public class ColumnRenderBuffer extends AbstractRenderBuffer
|
||||
private static void uploadBuffersDirect(GLVertexBuffer[] vbos, Iterator<ByteBuffer> iter, EGpuUploadMethod method) throws InterruptedException
|
||||
{
|
||||
long remainingNS = 0;
|
||||
long BPerNS = Config.Client.Advanced.Buffers.gpuUploadPerMegabyteInMilliseconds.get();
|
||||
long BPerNS = Config.Client.Advanced.GpuBuffers.gpuUploadPerMegabyteInMilliseconds.get();
|
||||
int vboIndex = 0;
|
||||
while (iter.hasNext())
|
||||
{
|
||||
|
||||
+6
-7
@@ -7,7 +7,6 @@ import com.seibel.lod.core.config.Config;
|
||||
import com.seibel.lod.core.config.listeners.ConfigChangeListener;
|
||||
import com.seibel.lod.core.dataObjects.render.ColumnRenderSource;
|
||||
import com.seibel.lod.core.dataObjects.render.columnViews.ColumnArrayView;
|
||||
import com.seibel.lod.core.dataObjects.transformers.DataRenderTransformer;
|
||||
import com.seibel.lod.core.enums.ELodDirection;
|
||||
import com.seibel.lod.core.level.IDhClientLevel;
|
||||
import com.seibel.lod.core.logging.ConfigBasedLogger;
|
||||
@@ -35,7 +34,7 @@ import java.util.concurrent.ThreadPoolExecutor;
|
||||
public class ColumnRenderBufferBuilder
|
||||
{
|
||||
public static final ConfigBasedLogger EVENT_LOGGER = new ConfigBasedLogger(LogManager.getLogger(),
|
||||
() -> Config.Client.Advanced.Debugging.DebugSwitch.logRendererBufferEvent.get());
|
||||
() -> Config.Client.Advanced.Logging.logRendererBufferEvent.get());
|
||||
private static final Logger LOGGER = DhLoggerBuilder.getLogger();
|
||||
|
||||
|
||||
@@ -66,12 +65,12 @@ public class ColumnRenderBufferBuilder
|
||||
{
|
||||
try
|
||||
{
|
||||
boolean enableTransparency = Config.Client.Graphics.Quality.transparency.get().tranparencyEnabled;
|
||||
boolean enableTransparency = Config.Client.Advanced.Graphics.Quality.transparency.get().tranparencyEnabled;
|
||||
|
||||
EVENT_LOGGER.trace("RenderRegion start QuadBuild @ "+renderSource.sectionPos);
|
||||
boolean enableSkyLightCulling = Config.Client.Graphics.AdvancedGraphics.enableCaveCulling.get();
|
||||
boolean enableSkyLightCulling = Config.Client.Advanced.Graphics.AdvancedGraphics.enableCaveCulling.get();
|
||||
|
||||
int skyLightCullingBelow = Config.Client.Graphics.AdvancedGraphics.caveCullingHeight.get();
|
||||
int skyLightCullingBelow = Config.Client.Advanced.Graphics.AdvancedGraphics.caveCullingHeight.get();
|
||||
// FIXME: Clamp also to the max world height.
|
||||
skyLightCullingBelow = Math.max(skyLightCullingBelow, clientLevel.getMinY());
|
||||
|
||||
@@ -371,14 +370,14 @@ public class ColumnRenderBufferBuilder
|
||||
// static setup
|
||||
if (configListener == null)
|
||||
{
|
||||
configListener = new ConfigChangeListener<>(Config.Client.Advanced.Threading.numberOfBufferBuilderThreads, (threadCount) -> { setThreadPoolSize(threadCount); });
|
||||
configListener = new ConfigChangeListener<>(Config.Client.Advanced.MultiThreading.numberOfBufferBuilderThreads, (threadCount) -> { setThreadPoolSize(threadCount); });
|
||||
}
|
||||
|
||||
|
||||
if (bufferBuilderThreadPool == null || bufferBuilderThreadPool.isTerminated())
|
||||
{
|
||||
LOGGER.info("Starting "+ ColumnRenderBufferBuilder.class.getSimpleName());
|
||||
setThreadPoolSize(Config.Client.Advanced.Threading.numberOfBufferBuilderThreads.get());
|
||||
setThreadPoolSize(Config.Client.Advanced.MultiThreading.numberOfBufferBuilderThreads.get());
|
||||
}
|
||||
}
|
||||
public static void setThreadPoolSize(int threadPoolSize)
|
||||
|
||||
+2
-7
@@ -65,10 +65,9 @@ public class CubicLodTemplate
|
||||
boolean fullBright = false;
|
||||
switch (debugging) {
|
||||
case OFF:
|
||||
case SHOW_WIREFRAME:
|
||||
{
|
||||
float saturationMultiplier = Config.Client.Graphics.AdvancedGraphics.saturationMultiplier.get().floatValue();
|
||||
float brightnessMultiplier = Config.Client.Graphics.AdvancedGraphics.brightnessMultiplier.get().floatValue();
|
||||
float saturationMultiplier = Config.Client.Advanced.Graphics.AdvancedGraphics.saturationMultiplier.get().floatValue();
|
||||
float brightnessMultiplier = Config.Client.Advanced.Graphics.AdvancedGraphics.brightnessMultiplier.get().floatValue();
|
||||
if (saturationMultiplier == 1.0 && brightnessMultiplier == 1.0)
|
||||
{
|
||||
color = RenderDataPointUtil.getColor(data);
|
||||
@@ -84,28 +83,24 @@ public class CubicLodTemplate
|
||||
break;
|
||||
}
|
||||
case SHOW_DETAIL:
|
||||
case SHOW_DETAIL_WIREFRAME:
|
||||
{
|
||||
color = LodUtil.DEBUG_DETAIL_LEVEL_COLORS[detailLevel];
|
||||
fullBright = true;
|
||||
break;
|
||||
}
|
||||
case SHOW_GENMODE:
|
||||
case SHOW_GENMODE_WIREFRAME:
|
||||
{
|
||||
color = LodUtil.DEBUG_DETAIL_LEVEL_COLORS[RenderDataPointUtil.getGenerationMode(data)];
|
||||
fullBright = true;
|
||||
break;
|
||||
}
|
||||
case SHOW_OVERLAPPING_QUADS:
|
||||
case SHOW_OVERLAPPING_QUADS_WIREFRAME:
|
||||
{
|
||||
color = ColorUtil.WHITE;
|
||||
fullBright = true;
|
||||
break;
|
||||
}
|
||||
case SHOW_RENDER_SOURCE_FLAG:
|
||||
case SHOW_RENDER_SOURCE_FLAG_WIREFRAME:
|
||||
{
|
||||
color = debugSource == null ? ColorUtil.RED : debugSource.color;
|
||||
fullBright = true;
|
||||
|
||||
+2
-2
@@ -765,9 +765,9 @@ public class LodQuadBuilder
|
||||
return i;
|
||||
}
|
||||
|
||||
/** Returns how many Buffers will be needed to render opaque quads in this builder. */
|
||||
/** Returns how many GpuBuffers will be needed to render opaque quads in this builder. */
|
||||
public int getCurrentNeededOpaqueVertexBufferCount() { return MathUtil.ceilDiv(this.getCurrentOpaqueQuadsCount(), AbstractRenderBuffer.MAX_QUADS_PER_BUFFER); }
|
||||
/** Returns how many Buffers will be needed to render transparent quads in this builder. */
|
||||
/** Returns how many GpuBuffers will be needed to render transparent quads in this builder. */
|
||||
public int getCurrentNeededTransparentVertexBufferCount()
|
||||
{
|
||||
if (!this.doTransparency)
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import org.apache.logging.log4j.LogManager;
|
||||
//FIXME: To-Be-Used class
|
||||
public class ChunkToLodBuilder
|
||||
{
|
||||
public static final ConfigBasedLogger LOGGER = new ConfigBasedLogger(LogManager.getLogger(), () -> Config.Client.Advanced.Debugging.DebugSwitch.logLodBuilderEvent.get());
|
||||
public static final ConfigBasedLogger LOGGER = new ConfigBasedLogger(LogManager.getLogger(), () -> Config.Client.Advanced.Logging.logLodBuilderEvent.get());
|
||||
private static final IMinecraftClientWrapper MC = SingletonInjector.INSTANCE.get(IMinecraftClientWrapper.class);
|
||||
|
||||
public static final long MAX_TICK_TIME_NS = 1000000000L / 20L;
|
||||
|
||||
+2
-3
@@ -6,7 +6,6 @@ import com.seibel.lod.core.dataObjects.fullData.sources.interfaces.IFullDataSour
|
||||
import com.seibel.lod.core.dataObjects.render.ColumnRenderLoader;
|
||||
import com.seibel.lod.core.dataObjects.render.ColumnRenderSource;
|
||||
import com.seibel.lod.core.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.lod.core.file.fullDatafile.FullDataFileHandler;
|
||||
import com.seibel.lod.core.level.IDhClientLevel;
|
||||
import com.seibel.lod.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.lod.core.util.ThreadUtil;
|
||||
@@ -78,14 +77,14 @@ public class DataRenderTransformer
|
||||
// static setup
|
||||
if (configListener == null)
|
||||
{
|
||||
configListener = new ConfigChangeListener<>(Config.Client.Advanced.Threading.numberOfDataConverterThreads, (threadCount) -> { setThreadPoolSize(threadCount); });
|
||||
configListener = new ConfigChangeListener<>(Config.Client.Advanced.MultiThreading.numberOfDataConverterThreads, (threadCount) -> { setThreadPoolSize(threadCount); });
|
||||
}
|
||||
|
||||
|
||||
if (transformerThreadPool == null || transformerThreadPool.isTerminated())
|
||||
{
|
||||
LOGGER.info("Starting "+DataRenderTransformer.class.getSimpleName());
|
||||
setThreadPoolSize(Config.Client.Advanced.Threading.numberOfDataConverterThreads.get());
|
||||
setThreadPoolSize(Config.Client.Advanced.MultiThreading.numberOfDataConverterThreads.get());
|
||||
}
|
||||
}
|
||||
public static void setThreadPoolSize(int threadPoolSize) { transformerThreadPool = ThreadUtil.makeThreadPool(threadPoolSize, "Data/Render Transformer"); }
|
||||
|
||||
+2
-2
@@ -59,7 +59,7 @@ public class FullDataToRenderDataTransformer
|
||||
{
|
||||
final DhSectionPos pos = fullDataSource.getSectionPos();
|
||||
final byte dataDetail = fullDataSource.getDataDetailLevel();
|
||||
final int vertSize = Config.Client.Graphics.Quality.verticalQuality.get().calculateMaxVerticalData(fullDataSource.getDataDetailLevel());
|
||||
final int vertSize = Config.Client.Advanced.Graphics.Quality.verticalQuality.get().calculateMaxVerticalData(fullDataSource.getDataDetailLevel());
|
||||
final ColumnRenderSource columnSource = new ColumnRenderSource(pos, vertSize, level.getMinY());
|
||||
if (fullDataSource.isEmpty())
|
||||
{
|
||||
@@ -109,7 +109,7 @@ public class FullDataToRenderDataTransformer
|
||||
{
|
||||
final DhSectionPos pos = data.getSectionPos();
|
||||
final byte dataDetail = data.getDataDetailLevel();
|
||||
final int vertSize = Config.Client.Graphics.Quality.verticalQuality.get().calculateMaxVerticalData(data.getDataDetailLevel());
|
||||
final int vertSize = Config.Client.Advanced.Graphics.Quality.verticalQuality.get().calculateMaxVerticalData(data.getDataDetailLevel());
|
||||
final ColumnRenderSource columnSource = new ColumnRenderSource(pos, vertSize, level.getMinY());
|
||||
if (data.isEmpty())
|
||||
{
|
||||
|
||||
@@ -3,13 +3,11 @@ package com.seibel.lod.core.file.fullDatafile;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.seibel.lod.core.config.Config;
|
||||
import com.seibel.lod.core.config.listeners.ConfigChangeListener;
|
||||
import com.seibel.lod.core.config.types.ConfigEntry;
|
||||
import com.seibel.lod.core.dataObjects.fullData.accessor.ChunkSizedFullDataAccessor;
|
||||
import com.seibel.lod.core.dataObjects.fullData.sources.*;
|
||||
import com.seibel.lod.core.dataObjects.fullData.sources.CompleteFullDataSource;
|
||||
import com.seibel.lod.core.dataObjects.fullData.sources.interfaces.IFullDataSource;
|
||||
import com.seibel.lod.core.dataObjects.fullData.sources.interfaces.IIncompleteFullDataSource;
|
||||
import com.seibel.lod.core.dataObjects.transformers.DataRenderTransformer;
|
||||
import com.seibel.lod.core.util.FileUtil;
|
||||
import com.seibel.lod.core.file.metaData.BaseMetaData;
|
||||
import com.seibel.lod.core.level.IDhLevel;
|
||||
@@ -479,14 +477,14 @@ public class FullDataFileHandler implements IFullDataSourceProvider
|
||||
// static setup
|
||||
if (configListener == null)
|
||||
{
|
||||
configListener = new ConfigChangeListener<>(Config.Client.Advanced.Threading.numberOfFileHandlerThreads, (threadCount) -> { setThreadPoolSize(threadCount); });
|
||||
configListener = new ConfigChangeListener<>(Config.Client.Advanced.MultiThreading.numberOfFileHandlerThreads, (threadCount) -> { setThreadPoolSize(threadCount); });
|
||||
}
|
||||
|
||||
|
||||
if (fileHandlerThreadPool == null || fileHandlerThreadPool.isTerminated())
|
||||
{
|
||||
LOGGER.info("Starting "+FullDataFileHandler.class.getSimpleName());
|
||||
setThreadPoolSize(Config.Client.Advanced.Threading.numberOfFileHandlerThreads.get());
|
||||
setThreadPoolSize(Config.Client.Advanced.MultiThreading.numberOfFileHandlerThreads.get());
|
||||
}
|
||||
}
|
||||
public static void setThreadPoolSize(int threadPoolSize) { fileHandlerThreadPool = ThreadUtil.makeThreadPool(threadPoolSize, FullDataFileHandler.class.getSimpleName()+"Thread"); }
|
||||
|
||||
@@ -219,7 +219,7 @@ public class RenderSourceFileHandler implements ILodRenderSourceProvider
|
||||
|
||||
public CompletableFuture<ColumnRenderSource> onCreateRenderFileAsync(RenderMetaDataFile file)
|
||||
{
|
||||
final int verticalSize = Config.Client.Graphics.Quality.verticalQuality.get()
|
||||
final int verticalSize = Config.Client.Advanced.Graphics.Quality.verticalQuality.get()
|
||||
.calculateMaxVerticalData((byte) (file.pos.sectionDetailLevel - ColumnRenderSource.SECTION_SIZE_OFFSET));
|
||||
|
||||
return CompletableFuture.completedFuture(
|
||||
|
||||
@@ -58,7 +58,7 @@ public class ClientOnlySaveStructure extends AbstractSaveStructure
|
||||
{
|
||||
return this.levelToFileMap.computeIfAbsent(level, (newLevel) ->
|
||||
{
|
||||
if (Config.Client.Multiplayer.multiDimensionRequiredSimilarity.get() == 0)
|
||||
if (Config.Client.Advanced.Multiplayer.multiDimensionRequiredSimilarity.get() == 0)
|
||||
{
|
||||
if (this.fileMatcher != null)
|
||||
{
|
||||
@@ -184,11 +184,7 @@ public class ClientOnlySaveStructure extends AbstractSaveStructure
|
||||
|
||||
|
||||
// determine the auto folder name format
|
||||
EServerFolderNameMode folderNameMode = Config.Client.Multiplayer.serverFolderNameMode.get();
|
||||
if (folderNameMode == EServerFolderNameMode.AUTO)
|
||||
{
|
||||
folderNameMode = EServerFolderNameMode.NAME_ONLY;
|
||||
}
|
||||
EServerFolderNameMode folderNameMode = Config.Client.Advanced.Multiplayer.serverFolderNameMode.get();
|
||||
String serverName = MC_CLIENT.getCurrentServerName().replaceAll(INVALID_FILE_CHARACTERS_REGEX, "");
|
||||
String serverMcVersion = MC_CLIENT.getCurrentServerVersion().replaceAll(INVALID_FILE_CHARACTERS_REGEX, "");
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ public class SubDimCompare implements Comparable<SubDimCompare>
|
||||
/** Returns true if this sub dimension is close enough to be considered a valid sub dimension */
|
||||
public boolean isValidSubDim()
|
||||
{
|
||||
double minimumSimilarityRequired = Config.Client.Multiplayer.multiDimensionRequiredSimilarity.get();
|
||||
double minimumSimilarityRequired = Config.Client.Advanced.Multiplayer.multiDimensionRequiredSimilarity.get();
|
||||
return this.getPercentEqual() >= minimumSimilarityRequired
|
||||
|| this.playerPosDist <= MAX_SIMILAR_PLAYER_POS_DISTANCE_IN_BLOCKS;
|
||||
}
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ public class SubDimensionLevelMatcher implements AutoCloseable
|
||||
{
|
||||
private static final IMinecraftClientWrapper MC_CLIENT = SingletonInjector.INSTANCE.get(IMinecraftClientWrapper.class);
|
||||
public static final ConfigBasedLogger LOGGER = new ConfigBasedLogger(LogManager.getLogger(),
|
||||
() -> Config.Client.Advanced.Debugging.DebugSwitch.logFileSubDimEvent.get());
|
||||
() -> Config.Client.Advanced.Logging.logFileSubDimEvent.get());
|
||||
|
||||
private final ExecutorService matcherThread = ThreadUtil.makeSingleThreadPool("Level-To-File-Matcher");
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ public class BatchGenerator implements IDhApiWorldGenerator
|
||||
@Override
|
||||
public boolean isBusy()
|
||||
{
|
||||
return this.generationEnvironment.getEventCount() > Math.max(Config.Client.Advanced.Threading.numberOfWorldGenerationThreads.get().intValue(), 1) * MAX_QUEUED_TASKS;
|
||||
return this.generationEnvironment.getEventCount() > Math.max(Config.Client.Advanced.MultiThreading.numberOfWorldGenerationThreads.get().intValue(), 1) * MAX_QUEUED_TASKS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public class WorldGenerationQueue implements Closeable
|
||||
this.largestDataDetail = generator.getLargestDataDetailLevel();
|
||||
this.smallestDataDetail = generator.getSmallestDataDetailLevel();
|
||||
|
||||
int treeWidth = Config.Client.Graphics.Quality.lodChunkRenderDistance.get() * LodUtil.CHUNK_WIDTH * 2; // TODO the *2 is to allow for generation edge cases, and should probably be removed at some point
|
||||
int treeWidth = Config.Client.Advanced.Graphics.Quality.lodChunkRenderDistance.get() * LodUtil.CHUNK_WIDTH * 2; // TODO the *2 is to allow for generation edge cases, and should probably be removed at some point
|
||||
byte treeMinDetailLevel = LodUtil.BLOCK_DETAIL_LEVEL; // the tree shouldn't need to go this low, but just in case
|
||||
this.waitingTaskQuadTree = new QuadTree<>(treeWidth, DhBlockPos2D.ZERO /*the quad tree will be re-centered later*/, treeMinDetailLevel);
|
||||
|
||||
@@ -429,7 +429,7 @@ public class WorldGenerationQueue implements Closeable
|
||||
byte granularity, byte targetDataDetail,
|
||||
Consumer<ChunkSizedFullDataAccessor> generationCompleteConsumer)
|
||||
{
|
||||
EDhApiDistantGeneratorMode generatorMode = Config.Client.WorldGenerator.distantGeneratorMode.get();
|
||||
EDhApiDistantGeneratorMode generatorMode = Config.Client.Advanced.WorldGenerator.distantGeneratorMode.get();
|
||||
return this.generator.generateChunks(chunkPosMin.x, chunkPosMin.z, granularity, targetDataDetail, generatorMode, worldGeneratorThreadPool, (generatedObjectArray) ->
|
||||
{
|
||||
try
|
||||
@@ -440,7 +440,7 @@ public class WorldGenerationQueue implements Closeable
|
||||
catch (ClassCastException e)
|
||||
{
|
||||
DhLoggerBuilder.getLogger().error("World generator return type incorrect. Error: ["+e.getMessage()+"]. World generator disabled.", e);
|
||||
Config.Client.WorldGenerator.enableDistantGeneration.set(false);
|
||||
Config.Client.Advanced.WorldGenerator.enableDistantGeneration.set(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -460,14 +460,14 @@ public class WorldGenerationQueue implements Closeable
|
||||
// static setup
|
||||
if (configListener == null)
|
||||
{
|
||||
configListener = new ConfigChangeListener<>(Config.Client.Advanced.Threading.numberOfWorldGenerationThreads, (threadCount) -> { setThreadPoolSize(threadCount); });
|
||||
configListener = new ConfigChangeListener<>(Config.Client.Advanced.MultiThreading.numberOfWorldGenerationThreads, (threadCount) -> { setThreadPoolSize(threadCount); });
|
||||
}
|
||||
|
||||
|
||||
if (worldGeneratorThreadPool == null || worldGeneratorThreadPool.isTerminated())
|
||||
{
|
||||
LOGGER.info("Starting "+ FullDataFileHandler.class.getSimpleName());
|
||||
setThreadPoolSize(Config.Client.Advanced.Threading.numberOfWorldGenerationThreads.get());
|
||||
setThreadPoolSize(Config.Client.Advanced.MultiThreading.numberOfWorldGenerationThreads.get());
|
||||
}
|
||||
}
|
||||
public static void setThreadPoolSize(int threadPoolSize) { worldGeneratorThreadPool = ThreadUtil.makeThreadPool(threadPoolSize, "DH-Gen-Worker-Thread", Thread.MIN_PRIORITY); }
|
||||
|
||||
@@ -47,11 +47,12 @@ public class SelfUpdater {
|
||||
|
||||
|
||||
LOGGER.info("New version ("+ModrinthGetter.getLatestNameForVersion(mcVersion)+") of "+ ModInfo.READABLE_NAME+" is available");
|
||||
if (!Config.Client.AutoUpdater.promptForUpdate.get()) {
|
||||
// Auto-update mod
|
||||
updateMod(mcVersion);
|
||||
return false;
|
||||
} // else
|
||||
if (Config.Client.Advanced.AutoUpdater.automaticallyUpdate.get())
|
||||
{
|
||||
// Auto-update mod
|
||||
updateMod(mcVersion);
|
||||
return false;
|
||||
} // else
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ public abstract class AbstractDhClientLevel implements IDhClientLevel
|
||||
return false;
|
||||
}
|
||||
|
||||
if (clientRenderState.quadtree.blockRenderDistance != Config.Client.Graphics.Quality.lodChunkRenderDistance.get() * LodUtil.CHUNK_WIDTH)
|
||||
if (clientRenderState.quadtree.blockRenderDistance != Config.Client.Advanced.Graphics.Quality.lodChunkRenderDistance.get() * LodUtil.CHUNK_WIDTH)
|
||||
{
|
||||
if (!this.ClientRenderStateRef.compareAndSet(clientRenderState, null))
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@ public class DhClientServerLevel extends AbstractDhClientLevel implements IDhCli
|
||||
|
||||
FileScanUtil.scanFiles(saveStructure, this.serverLevelWrapper, this.fullDataFileHandler, null);
|
||||
|
||||
this.worldGeneratorEnabledConfig = new AppliedConfigState<>(Config.Client.WorldGenerator.enableDistantGeneration);
|
||||
this.worldGeneratorEnabledConfig = new AppliedConfigState<>(Config.Client.Advanced.WorldGenerator.enableDistantGeneration);
|
||||
|
||||
|
||||
LOGGER.info("Started "+DhClientServerLevel.class.getSimpleName()+" for "+ serverLevelWrapper +" with saves at "+saveStructure);
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ClientRenderState
|
||||
this.levelWrapper = dhClientLevel.getLevelWrapper();
|
||||
this.renderSourceFileHandler = new RenderSourceFileHandler(fullDataSourceProvider, dhClientLevel, saveStructure.getRenderCacheFolder(this.levelWrapper));
|
||||
|
||||
this.quadtree = new LodQuadTree(dhClientLevel, Config.Client.Graphics.Quality.lodChunkRenderDistance.get() * LodUtil.CHUNK_WIDTH,
|
||||
this.quadtree = new LodQuadTree(dhClientLevel, Config.Client.Advanced.Graphics.Quality.lodChunkRenderDistance.get() * LodUtil.CHUNK_WIDTH,
|
||||
MC_CLIENT.getPlayerBlockPos().x, MC_CLIENT.getPlayerBlockPos().z, this.renderSourceFileHandler);
|
||||
|
||||
RenderBufferHandler renderBufferHandler = new RenderBufferHandler(this.quadtree);
|
||||
|
||||
@@ -66,7 +66,7 @@ public class LodFogConfig
|
||||
|
||||
public static LodFogConfig generateFogConfig()
|
||||
{
|
||||
EFogDrawMode fogMode = Config.Client.Graphics.FogQuality.fogDrawMode.get();
|
||||
EFogDrawMode fogMode = Config.Client.Advanced.Graphics.Fog.fogDrawMode.get();
|
||||
if (fogMode == EFogDrawMode.USE_OPTIFINE_SETTING && OPTIFINE != null)
|
||||
{
|
||||
fogMode = OPTIFINE.getFogDrawMode();
|
||||
@@ -78,17 +78,17 @@ public class LodFogConfig
|
||||
private LodFogConfig(EFogDrawMode fogDrawMode)
|
||||
{
|
||||
// TODO: Move these out of here
|
||||
earthCurveRatio = Config.Client.Graphics.AdvancedGraphics.earthCurveRatio.get();
|
||||
earthCurveRatio = Config.Client.Advanced.Graphics.AdvancedGraphics.earthCurveRatio.get();
|
||||
|
||||
noiseEnable = Config.Client.Graphics.AdvancedGraphics.NoiseSettings.noiseEnable.get();
|
||||
noiseSteps = Config.Client.Graphics.AdvancedGraphics.NoiseSettings.noiseSteps.get();
|
||||
noiseIntensity = Config.Client.Graphics.AdvancedGraphics.NoiseSettings.noiseIntensity.get().floatValue();
|
||||
noiseDropoff = Config.Client.Graphics.AdvancedGraphics.NoiseSettings.noiseDropoff.get().floatValue();
|
||||
noiseEnable = Config.Client.Advanced.Graphics.NoiseTextureSettings.noiseEnable.get();
|
||||
noiseSteps = Config.Client.Advanced.Graphics.NoiseTextureSettings.noiseSteps.get();
|
||||
noiseIntensity = Config.Client.Advanced.Graphics.NoiseTextureSettings.noiseIntensity.get().floatValue();
|
||||
noiseDropoff = Config.Client.Advanced.Graphics.NoiseTextureSettings.noiseDropoff.get().floatValue();
|
||||
|
||||
|
||||
if (fogDrawMode != EFogDrawMode.FOG_DISABLED)
|
||||
{
|
||||
EFogDistance fogDistance = Config.Client.Graphics.FogQuality.fogDistance.get();
|
||||
EFogDistance fogDistance = Config.Client.Advanced.Graphics.Fog.fogDistance.get();
|
||||
drawNearFog = (fogDistance == EFogDistance.NEAR || fogDistance == EFogDistance.NEAR_AND_FAR);
|
||||
|
||||
if (fogDistance == EFogDistance.FAR || fogDistance == EFogDistance.NEAR_AND_FAR)
|
||||
@@ -96,15 +96,15 @@ public class LodFogConfig
|
||||
// far fog should be drawn
|
||||
|
||||
farFogSetting = new FogSettings(
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.farFogStart.get(),
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.farFogEnd.get(),
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.farFogMin.get(),
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.farFogMax.get(),
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.farFogDensity.get(),
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.farFogType.get()
|
||||
Config.Client.Advanced.Graphics.Fog.AdvancedFog.farFogStart.get(),
|
||||
Config.Client.Advanced.Graphics.Fog.AdvancedFog.farFogEnd.get(),
|
||||
Config.Client.Advanced.Graphics.Fog.AdvancedFog.farFogMin.get(),
|
||||
Config.Client.Advanced.Graphics.Fog.AdvancedFog.farFogMax.get(),
|
||||
Config.Client.Advanced.Graphics.Fog.AdvancedFog.farFogDensity.get(),
|
||||
Config.Client.Advanced.Graphics.Fog.AdvancedFog.farFogFalloff.get()
|
||||
);
|
||||
|
||||
heightFogMixMode = Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogMixMode.get();
|
||||
heightFogMixMode = Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogMixMode.get();
|
||||
if (heightFogMixMode == EHeightFogMixMode.IGNORE_HEIGHT || heightFogMixMode == EHeightFogMixMode.BASIC)
|
||||
{
|
||||
// basic fog mixing
|
||||
@@ -118,15 +118,15 @@ public class LodFogConfig
|
||||
// advanced fog mixing
|
||||
|
||||
heightFogSetting = new FogSettings(
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogDensity.get(),
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogEnd.get(),
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogMin.get(),
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogMax.get(),
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogDensity.get(),
|
||||
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogType.get()
|
||||
Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogDensity.get(),
|
||||
Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogEnd.get(),
|
||||
Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogMin.get(),
|
||||
Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogMax.get(),
|
||||
Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogDensity.get(),
|
||||
Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogFalloff.get()
|
||||
);
|
||||
|
||||
heightFogMode = Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogMode.get();
|
||||
heightFogMode = Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogMode.get();
|
||||
|
||||
if (heightFogMode.basedOnCamera)
|
||||
{
|
||||
@@ -134,7 +134,7 @@ public class LodFogConfig
|
||||
}
|
||||
else
|
||||
{
|
||||
heightFogHeight = Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogHeight.get().floatValue();
|
||||
heightFogHeight = Config.Client.Advanced.Graphics.Fog.AdvancedFog.HeightFog.heightFogHeight.get().floatValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class GLProxy
|
||||
|
||||
private static final Logger LOGGER = DhLoggerBuilder.getLogger(MethodHandles.lookup().lookupClass().getSimpleName());
|
||||
public static final ConfigBasedLogger GL_LOGGER = new ConfigBasedLogger(LogManager.getLogger(GLProxy.class),
|
||||
() -> Config.Client.Advanced.Debugging.DebugSwitch.logRendererGLEvent.get());
|
||||
() -> Config.Client.Advanced.Logging.logRendererGLEvent.get());
|
||||
|
||||
private static GLProxy instance = null;
|
||||
|
||||
@@ -351,7 +351,7 @@ public class GLProxy
|
||||
|
||||
public EGpuUploadMethod getGpuUploadMethod()
|
||||
{
|
||||
EGpuUploadMethod method = Config.Client.Advanced.Buffers.gpuUploadMethod.get();
|
||||
EGpuUploadMethod method = Config.Client.Advanced.GpuBuffers.gpuUploadMethod.get();
|
||||
if (!bufferStorageSupported && method == EGpuUploadMethod.BUFFER_STORAGE)
|
||||
{
|
||||
// if buffer storage isn't supported
|
||||
|
||||
@@ -60,10 +60,10 @@ import java.util.concurrent.TimeUnit;
|
||||
public class LodRenderer
|
||||
{
|
||||
public static final ConfigBasedLogger EVENT_LOGGER = new ConfigBasedLogger(LogManager.getLogger(LodRenderer.class),
|
||||
() -> Config.Client.Advanced.Debugging.DebugSwitch.logRendererBufferEvent.get());
|
||||
() -> Config.Client.Advanced.Logging.logRendererBufferEvent.get());
|
||||
|
||||
public static ConfigBasedSpamLogger tickLogger = new ConfigBasedSpamLogger(LogManager.getLogger(LodRenderer.class),
|
||||
() -> Config.Client.Advanced.Debugging.DebugSwitch.logRendererBufferEvent.get(),1);
|
||||
() -> Config.Client.Advanced.Logging.logRendererBufferEvent.get(),1);
|
||||
public static final boolean ENABLE_DRAW_LAG_SPIKE_LOGGING = false;
|
||||
public static final boolean ENABLE_DUMP_GL_STATE = true;
|
||||
public static final long DRAW_LAG_SPIKE_THRESHOLD_NS = TimeUnit.NANOSECONDS.convert(20, TimeUnit.MILLISECONDS);
|
||||
@@ -154,7 +154,7 @@ public class LodRenderer
|
||||
drawSaveGLState.end("drawSaveGLState");
|
||||
|
||||
GLProxy glProxy = GLProxy.getInstance();
|
||||
if (Config.Client.Graphics.FogQuality.disableVanillaFog.get())
|
||||
if (Config.Client.Advanced.Graphics.Fog.disableVanillaFog.get())
|
||||
MC_RENDER.tryDisableVanillaFog();
|
||||
|
||||
//===================//
|
||||
@@ -168,16 +168,14 @@ public class LodRenderer
|
||||
GL32.glViewport(0,0, MC_RENDER.getTargetFrameBufferViewportWidth(), MC_RENDER.getTargetFrameBufferViewportHeight());
|
||||
GL32.glBindBuffer(GL32.GL_ARRAY_BUFFER, 0);
|
||||
// set the required open GL settings
|
||||
ConfigEntry<EDebugMode> debugModeConfig = Config.Client.Advanced.Debugging.debugMode;
|
||||
if (debugModeConfig.get() == EDebugMode.SHOW_DETAIL_WIREFRAME
|
||||
|| debugModeConfig.get() == EDebugMode.SHOW_GENMODE_WIREFRAME
|
||||
|| debugModeConfig.get() == EDebugMode.SHOW_WIREFRAME
|
||||
|| debugModeConfig.get() == EDebugMode.SHOW_OVERLAPPING_QUADS_WIREFRAME
|
||||
|| debugModeConfig.get() == EDebugMode.SHOW_RENDER_SOURCE_FLAG_WIREFRAME) {
|
||||
boolean renderWireframe = Config.Client.Advanced.Debugging.renderWireframe.get();
|
||||
if (renderWireframe)
|
||||
{
|
||||
GL32.glPolygonMode(GL32.GL_FRONT_AND_BACK, GL32.GL_LINE);
|
||||
//GL32.glDisable(GL32.GL_CULL_FACE);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
GL32.glPolygonMode(GL32.GL_FRONT_AND_BACK, GL32.GL_FILL);
|
||||
GL32.glEnable(GL32.GL_CULL_FACE);
|
||||
}
|
||||
@@ -187,8 +185,8 @@ public class LodRenderer
|
||||
|
||||
|
||||
|
||||
transparencyEnabled = Config.Client.Graphics.Quality.transparency.get().tranparencyEnabled;
|
||||
fakeOceanFloor = Config.Client.Graphics.Quality.transparency.get().fakeTransparencyEnabled;
|
||||
transparencyEnabled = Config.Client.Advanced.Graphics.Quality.transparency.get().tranparencyEnabled;
|
||||
fakeOceanFloor = Config.Client.Advanced.Graphics.Quality.transparency.get().fakeTransparencyEnabled;
|
||||
|
||||
GL32.glDisable(GL32.GL_BLEND); // We render opaque first, then transparent
|
||||
GL32.glDepthMask(true);
|
||||
@@ -236,12 +234,11 @@ public class LodRenderer
|
||||
//===========//
|
||||
profiler.popPush("LOD draw");
|
||||
LagSpikeCatcher draw = new LagSpikeCatcher();
|
||||
|
||||
boolean cullingDisabled = Config.Client.Graphics.AdvancedGraphics.disableDirectionalCulling.get();
|
||||
|
||||
Vec3d cameraPos = MC_RENDER.getCameraExactPosition();
|
||||
DhBlockPos cameraBlockPos = MC_RENDER.getCameraBlockPosition();
|
||||
Vec3f cameraDir = MC_RENDER.getLookAtVector();
|
||||
|
||||
|
||||
//TODO: Directional culling
|
||||
bufferHandler.renderOpaque(this);
|
||||
|
||||
@@ -312,7 +309,7 @@ public class LodRenderer
|
||||
{
|
||||
Color fogColor;
|
||||
|
||||
if (Config.Client.Graphics.FogQuality.fogColorMode.get() == EFogColorMode.USE_SKY_COLOR)
|
||||
if (Config.Client.Advanced.Graphics.Fog.fogColorMode.get() == EFogColorMode.USE_SKY_COLOR)
|
||||
fogColor = MC_RENDER.getSkyColor();
|
||||
else
|
||||
fogColor = MC_RENDER.getFogColor(partialTicks);
|
||||
|
||||
@@ -31,21 +31,21 @@ import com.seibel.lod.coreapi.util.MathUtil;
|
||||
@Deprecated
|
||||
public class DetailDistanceUtil
|
||||
{
|
||||
public static byte minDetail = Config.Client.Graphics.Quality.drawResolution.get().detailLevel;
|
||||
public static byte minDetail = Config.Client.Advanced.Graphics.Quality.drawResolution.get().detailLevel;
|
||||
|
||||
private static final byte maxDetail = Byte.MAX_VALUE;
|
||||
private static final double minDistance = 0;
|
||||
private static double distanceUnit = 16 * Config.Client.Graphics.Quality.horizontalScale.get();
|
||||
private static double maxDistance = Config.Client.Graphics.Quality.lodChunkRenderDistance.get() * 16 * 2;
|
||||
private static double logBase = Math.log(Config.Client.Graphics.Quality.horizontalQuality.get().quadraticBase);
|
||||
private static double distanceUnit = 16 * Config.Client.Advanced.Graphics.Quality.horizontalScale.get();
|
||||
private static double maxDistance = Config.Client.Advanced.Graphics.Quality.lodChunkRenderDistance.get() * 16 * 2;
|
||||
private static double logBase = Math.log(Config.Client.Advanced.Graphics.Quality.horizontalQuality.get().quadraticBase);
|
||||
|
||||
|
||||
public static void updateSettings()
|
||||
{
|
||||
distanceUnit = 16 * Config.Client.Graphics.Quality.horizontalScale.get();
|
||||
minDetail = Config.Client.Graphics.Quality.drawResolution.get().detailLevel;
|
||||
maxDistance = Config.Client.Graphics.Quality.lodChunkRenderDistance.get() * 16 * 8;
|
||||
logBase = Math.log(Config.Client.Graphics.Quality.horizontalQuality.get().quadraticBase);
|
||||
distanceUnit = 16 * Config.Client.Advanced.Graphics.Quality.horizontalScale.get();
|
||||
minDetail = Config.Client.Advanced.Graphics.Quality.drawResolution.get().detailLevel;
|
||||
maxDistance = Config.Client.Advanced.Graphics.Quality.lodChunkRenderDistance.get() * 16 * 8;
|
||||
logBase = Math.log(Config.Client.Advanced.Graphics.Quality.horizontalQuality.get().quadraticBase);
|
||||
}
|
||||
|
||||
public static double baseDistanceFunction(int detail)
|
||||
@@ -57,11 +57,11 @@ public class DetailDistanceUtil
|
||||
|
||||
detail-=minDetail;
|
||||
|
||||
if (Config.Client.Graphics.Quality.horizontalQuality.get() == EHorizontalQuality.LOWEST)
|
||||
if (Config.Client.Advanced.Graphics.Quality.horizontalQuality.get() == EHorizontalQuality.LOWEST)
|
||||
return ((double)detail * distanceUnit);
|
||||
else
|
||||
{
|
||||
double base = Config.Client.Graphics.Quality.horizontalQuality.get().quadraticBase;
|
||||
double base = Config.Client.Advanced.Graphics.Quality.horizontalQuality.get().quadraticBase;
|
||||
return Math.pow(base, detail) * distanceUnit;
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public class DetailDistanceUtil
|
||||
|
||||
int detail;
|
||||
|
||||
if (Config.Client.Graphics.Quality.horizontalQuality.get() == EHorizontalQuality.LOWEST)
|
||||
if (Config.Client.Advanced.Graphics.Quality.horizontalQuality.get() == EHorizontalQuality.LOWEST)
|
||||
detail = (int) (distance/distanceUnit);
|
||||
else
|
||||
detail = (int) (Math.log(distance/distanceUnit) / logBase);
|
||||
|
||||
@@ -168,11 +168,11 @@ public class LodUtil
|
||||
|
||||
public static int computeOverdrawOffset() {
|
||||
int chunkRenderDist = MC_RENDER.getRenderDistance() + 1;
|
||||
EVanillaOverdraw overdraw = Config.Client.Graphics.AdvancedGraphics.vanillaOverdraw.get();
|
||||
EVanillaOverdraw overdraw = EVanillaOverdraw.ALWAYS; //Config.Client.Advanced.Graphics.AdvancedGraphics.vanillaOverdraw.get();
|
||||
if (overdraw == EVanillaOverdraw.ALWAYS) return Integer.MAX_VALUE;
|
||||
int offset;
|
||||
if (overdraw == EVanillaOverdraw.NEVER) {
|
||||
offset = Config.Client.Graphics.AdvancedGraphics.overdrawOffset.get();
|
||||
offset = 0; //Config.Client.Advanced.Graphics.AdvancedGraphics.overdrawOffset.get();
|
||||
} else {
|
||||
if (chunkRenderDist < MINIMUM_RENDER_DISTANCE_FOR_FAR_OVERDRAW) {
|
||||
offset = 1;
|
||||
@@ -186,8 +186,11 @@ public class LodUtil
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
|
||||
public static EdgeDistanceBooleanGrid readVanillaRenderedChunks() {
|
||||
|
||||
/** not currently used since the new rendering system can't easily toggle single chunks to render */
|
||||
@Deprecated
|
||||
public static EdgeDistanceBooleanGrid readVanillaRenderedChunks()
|
||||
{
|
||||
int offset = computeOverdrawOffset();
|
||||
if (offset == Integer.MAX_VALUE) return null;
|
||||
int renderDist = MC_RENDER.getRenderDistance() + 1;
|
||||
|
||||
@@ -179,11 +179,11 @@ public class RenderUtil
|
||||
int vanillaBlockRenderedDistance = MC_RENDER.getRenderDistance() * LodUtil.CHUNK_WIDTH;
|
||||
|
||||
float nearClipPlane;
|
||||
if (Config.Client.Advanced.lodOnlyMode.get())
|
||||
if (Config.Client.Advanced.Debugging.lodOnlyMode.get())
|
||||
{
|
||||
nearClipPlane = 0.1f;
|
||||
}
|
||||
else if (Config.Client.Graphics.AdvancedGraphics.useExtendedNearClipPlane.get())
|
||||
else if (Config.Client.Advanced.Graphics.AdvancedGraphics.useExtendedNearClipPlane.get())
|
||||
{
|
||||
nearClipPlane = Math.min(vanillaBlockRenderedDistance - LodUtil.CHUNK_WIDTH, (float) 8 * LodUtil.CHUNK_WIDTH); // allow a max near clip plane of 8 chunks
|
||||
}
|
||||
@@ -202,7 +202,7 @@ public class RenderUtil
|
||||
}
|
||||
public static int getFarClipPlaneDistanceInBlocks()
|
||||
{
|
||||
int lodChunkDist = Config.Client.Graphics.Quality.lodChunkRenderDistance.get();
|
||||
int lodChunkDist = Config.Client.Advanced.Graphics.Quality.lodChunkRenderDistance.get();
|
||||
return lodChunkDist * LodUtil.CHUNK_WIDTH;
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ public class DhClientWorld extends AbstractDhWorld implements IDhClientWorld
|
||||
|
||||
private void _clientTick()
|
||||
{
|
||||
int newBlockRenderDistance = Config.Client.Graphics.Quality.lodChunkRenderDistance.get() * LodUtil.CHUNK_WIDTH;
|
||||
int newBlockRenderDistance = Config.Client.Advanced.Graphics.Quality.lodChunkRenderDistance.get() * LodUtil.CHUNK_WIDTH;
|
||||
|
||||
Iterator<DhClientLevel> iterator = this.levels.values().iterator();
|
||||
while (iterator.hasNext())
|
||||
|
||||
@@ -369,6 +369,12 @@
|
||||
"Prompt for update",
|
||||
"lod.config.client.autoUpdater.promptForUpdate.@tooltip":
|
||||
"If disabled then when an update is available then it would update without prompting the user",
|
||||
|
||||
"lod.config.client.quickEnableRendering":
|
||||
"quickEnableRendering",
|
||||
"lod.config.client.quickEnableRendering.@tooltip":
|
||||
"quickEnableRendering tooltip",
|
||||
|
||||
"lod.config.client.optionsButton":
|
||||
"Show options button",
|
||||
"lod.config.client.optionsButton.@tooltip":
|
||||
|
||||
Reference in New Issue
Block a user