diff --git a/common/src/main/java/com/seibel/lod/common/Config.java b/common/src/main/java/com/seibel/lod/common/Config.java
index 9ff8f695a..041537898 100644
--- a/common/src/main/java/com/seibel/lod/common/Config.java
+++ b/common/src/main/java/com/seibel/lod/common/Config.java
@@ -54,12 +54,12 @@ public class Config
// |-> Threads
// |-> Buffers
// |-> Debugging
-
+
// Since the original config system uses forge stuff, that means we have to rewrite the whole config system
@ConfigAnnotations.ScreenEntry
public static Client client;
-
+
@ConfigAnnotations.FileComment
public static String _optionsButton = ILodConfigWrapperSingleton.IClient.OPTIONS_BUTTON_DESC;
// I know this option should be in Client
@@ -67,61 +67,61 @@ public class Config
// Tough it is in client in the wrapper singleton
@ConfigAnnotations.Entry
public static boolean optionsButton = true;
-
+
public static class Client
{
@ConfigAnnotations.ScreenEntry
public static Graphics graphics;
-
+
@ConfigAnnotations.ScreenEntry
public static WorldGenerator worldGenerator;
-
+
@ConfigAnnotations.ScreenEntry
public static Multiplayer multiplayer;
-
+
@ConfigAnnotations.ScreenEntry
public static Advanced advanced;
-
-
+
+
public static class Graphics
{
@ConfigAnnotations.ScreenEntry
public static Quality quality;
-
+
@ConfigAnnotations.ScreenEntry
public static FogQuality fogQuality;
-
+
@ConfigAnnotations.ScreenEntry
public static AdvancedGraphics advancedGraphics;
-
-
+
+
public static class Quality
{
@ConfigAnnotations.FileComment
public static String _drawResolution = IQuality.DRAW_RESOLUTION_DESC;
@ConfigAnnotations.Entry
public static HorizontalResolution drawResolution = IQuality.DRAW_RESOLUTION_DEFAULT;
-
+
@ConfigAnnotations.FileComment
public static String _lodChunkRenderDistance = IQuality.LOD_CHUNK_RENDER_DISTANCE_DESC;
@ConfigAnnotations.Entry(minValue = 16, maxValue = 2048)
public static int lodChunkRenderDistance = IQuality.LOD_CHUNK_RENDER_DISTANCE_MIN_DEFAULT_MAX.defaultValue;
-
+
@ConfigAnnotations.FileComment
public static String _verticalQuality = IQuality.VERTICAL_QUALITY_DESC;
@ConfigAnnotations.Entry
public static VerticalQuality verticalQuality = IQuality.VERTICAL_QUALITY_DEFAULT;
-
+
@ConfigAnnotations.FileComment
public static String _horizontalScale = IQuality.HORIZONTAL_SCALE_DESC;
@ConfigAnnotations.Entry(minValue = 2, maxValue = 32)
public static int horizontalScale = IQuality.HORIZONTAL_SCALE_MIN_DEFAULT_MAX.defaultValue;
-
+
@ConfigAnnotations.FileComment
public static String _horizontalQuality = IQuality.HORIZONTAL_SCALE_DESC;
@ConfigAnnotations.Entry
public static HorizontalQuality horizontalQuality = IQuality.HORIZONTAL_QUALITY_DEFAULT;
-
+
@ConfigAnnotations.FileComment
public static String _dropoffQuality = IQuality.DROPOFF_QUALITY_DESC;
@ConfigAnnotations.Entry
@@ -132,25 +132,25 @@ public class Config
@ConfigAnnotations.Entry(minValue = 0, maxValue = 7)
public static int lodBiomeBlending = IQuality.LOD_BIOME_BLENDING_MIN_DEFAULT_MAX.defaultValue;
}
-
-
+
+
public static class FogQuality
{
@ConfigAnnotations.FileComment
public static String _fogDistance = IFogQuality.FOG_DISTANCE_DESC;
@ConfigAnnotations.Entry
public static FogDistance fogDistance = IFogQuality.FOG_DISTANCE_DEFAULT;
-
+
@ConfigAnnotations.FileComment
public static String _fogDrawMode = IFogQuality.FOG_DRAW_MODE_DESC;
@ConfigAnnotations.Entry
public static FogDrawMode fogDrawMode = IFogQuality.FOG_DRAW_MODE_DEFAULT;
-
+
@ConfigAnnotations.FileComment
public static String _fogColorMode = IFogQuality.FOG_COLOR_MODE_DESC;
@ConfigAnnotations.Entry
public static FogColorMode fogColorMode = IFogQuality.FOG_COLOR_MODE_DEFAULT;
-
+
@ConfigAnnotations.FileComment
public static String _disableVanillaFog = IFogQuality.DISABLE_VANILLA_FOG_DESC;
@ConfigAnnotations.Entry
@@ -161,27 +161,27 @@ public class Config
public static class AdvancedFog {
static final double SQRT2 = 1.4142135623730951;
-
+
@ConfigAnnotations.FileComment
public static String _farFogStart = IAdvancedFog.FAR_FOG_START_DESC;
@ConfigAnnotations.Entry(minValue = 0.0, maxValue = SQRT2)
public static double farFogStart = IAdvancedFog.FAR_FOG_START_MIN_DEFAULT_MAX.defaultValue;
-
+
@ConfigAnnotations.FileComment
public static String _farFogEnd = IAdvancedFog.FAR_FOG_END_DESC;
@ConfigAnnotations.Entry(minValue = 0.0, maxValue = SQRT2)
public static double farFogEnd = IAdvancedFog.FAR_FOG_END_MIN_DEFAULT_MAX.defaultValue;
-
+
@ConfigAnnotations.FileComment
public static String _farFogMin = IAdvancedFog.FAR_FOG_MIN_DESC;
@ConfigAnnotations.Entry(minValue = -5.0, maxValue = SQRT2)
public static double farFogMin = IAdvancedFog.FAR_FOG_MIN_MIN_DEFAULT_MAX.defaultValue;
-
+
@ConfigAnnotations.FileComment
public static String _farFogMax = IAdvancedFog.FAR_FOG_MAX_DESC;
@ConfigAnnotations.Entry(minValue = 0.0, maxValue = 5.0)
public static double farFogMax = IAdvancedFog.FAR_FOG_MAX_MIN_DEFAULT_MAX.defaultValue;
-
+
@ConfigAnnotations.FileComment
public static String _farFogType = IAdvancedFog.FAR_FOG_TYPE_DESC;
@ConfigAnnotations.Entry
@@ -191,12 +191,12 @@ public class Config
public static String _farFogDensity = IAdvancedFog.FAR_FOG_DENSITY_DESC;
@ConfigAnnotations.Entry(minValue = 0.01, maxValue = 50.0)
public static double farFogDensity = IAdvancedFog.FAR_FOG_DENSITY_MIN_DEFAULT_MAX.defaultValue;
-
+
@ConfigAnnotations.ScreenEntry
public static HeightFog heightFog;
-
+
public static class HeightFog {
-
+
@ConfigAnnotations.FileComment
public static String _heightFogMixMode = IHeightFog.HEIGHT_FOG_MIX_MODE_DESC;
@ConfigAnnotations.Entry
@@ -205,46 +205,46 @@ public class Config
public static String _heightFogMode = IHeightFog.HEIGHT_FOG_MODE_DESC;
@ConfigAnnotations.Entry
public static HeightFogMode heightFogMode = IHeightFog.HEIGHT_FOG_MODE_DEFAULT;
-
+
@ConfigAnnotations.FileComment
public static String _heightFogHeight = IHeightFog.HEIGHT_FOG_HEIGHT_DESC;
@ConfigAnnotations.Entry(minValue = -4096.0, maxValue = 4096.0)
public static double heightFogHeight = IHeightFog.HEIGHT_FOG_HEIGHT_MIN_DEFAULT_MAX.defaultValue;
-
+
@ConfigAnnotations.FileComment
public static String _heightFogStart = IHeightFog.HEIGHT_FOG_START_DESC;
@ConfigAnnotations.Entry(minValue = 0.0, maxValue = SQRT2)
public static double heightFogStart = IHeightFog.HEIGHT_FOG_START_MIN_DEFAULT_MAX.defaultValue;
-
+
@ConfigAnnotations.FileComment
public static String _heightFogEnd = IHeightFog.HEIGHT_FOG_END_DESC;
@ConfigAnnotations.Entry(minValue = 0.0, maxValue = SQRT2)
public static double heightFogEnd = IHeightFog.HEIGHT_FOG_END_MIN_DEFAULT_MAX.defaultValue;
-
+
@ConfigAnnotations.FileComment
public static String _heightFogMin = IHeightFog.HEIGHT_FOG_MIN_DESC;
@ConfigAnnotations.Entry(minValue = -5.0, maxValue = SQRT2)
public static double heightFogMin = IHeightFog.HEIGHT_FOG_MIN_MIN_DEFAULT_MAX.defaultValue;
-
+
@ConfigAnnotations.FileComment
public static String _heightFogMax = IHeightFog.HEIGHT_FOG_MAX_DESC;
@ConfigAnnotations.Entry(minValue = 0.0, maxValue = 5.0)
public static double heightFogMax = IHeightFog.HEIGHT_FOG_MAX_MIN_DEFAULT_MAX.defaultValue;
-
+
@ConfigAnnotations.FileComment
public static String _heightFogType = IHeightFog.HEIGHT_FOG_TYPE_DESC;
@ConfigAnnotations.Entry
public static FogSetting.FogType heightFogType = IHeightFog.HEIGHT_FOG_TYPE_DEFAULT;
-
+
@ConfigAnnotations.FileComment
public static String _heightFogDensity = IHeightFog.HEIGHT_FOG_DENSITY_DESC;
@ConfigAnnotations.Entry(minValue = 0.01, maxValue = 50.0)
public static double heightFogDensity = IHeightFog.HEIGHT_FOG_DENSITY_MIN_DEFAULT_MAX.defaultValue;
-
- }
+
+ }
}
}
-
+
public static class AdvancedGraphics
{
@@ -252,12 +252,12 @@ public class Config
public static String _disableDirectionalCulling = IAdvancedGraphics.DISABLE_DIRECTIONAL_CULLING_DESC;
@ConfigAnnotations.Entry
public static boolean disableDirectionalCulling = IAdvancedGraphics.DISABLE_DIRECTIONAL_CULLING_DEFAULT;
-
+
@ConfigAnnotations.FileComment
public static String _vanillaOverdraw = IAdvancedGraphics.VANILLA_OVERDRAW_DESC;
@ConfigAnnotations.Entry
public static VanillaOverdraw vanillaOverdraw = IAdvancedGraphics.VANILLA_OVERDRAW_DEFAULT;
-
+
@ConfigAnnotations.FileComment
public static String _useExtendedNearClipPlane = IAdvancedGraphics.USE_EXTENDED_NEAR_CLIP_PLANE_DESC;
@ConfigAnnotations.Entry
@@ -273,7 +273,6 @@ public class Config
@ConfigAnnotations.Entry
public static double saturationMultiplier = IAdvancedGraphics.SATURATION_MULTIPLIER_DEFAULT;
-
/*
@ConfigAnnotations.FileComment
public static String _backsideCullingRange = IAdvancedGraphics.VANILLA_CULLING_RANGE_DESC;
@@ -282,16 +281,16 @@ public class Config
*/
}
}
-
-
+
+
public static class WorldGenerator
{
@ConfigAnnotations.FileComment
public static String _enableDistantGeneration = IWorldGenerator.ENABLE_DISTANT_GENERATION_DESC;
@ConfigAnnotations.Entry
public static boolean enableDistantGeneration = IWorldGenerator.ENABLE_DISTANT_GENERATION_DEFAULT;
-
-// @ConfigAnnotations.FileComment
+
+ // @ConfigAnnotations.FileComment
// public static String _distanceGenerationMode = IWorldGenerator.getDistanceGenerationModeDesc();
@ConfigAnnotations.Entry
public static DistanceGenerationMode distanceGenerationMode = IWorldGenerator.DISTANCE_GENERATION_MODE_DEFAULT;
@@ -319,9 +318,10 @@ public class Config
@ConfigAnnotations.Entry
public static BlocksToAvoid blocksToAvoid = IWorldGenerator.BLOCKS_TO_AVOID_DEFAULT;
}
-
-
- public static class Multiplayer {
+
+
+ public static class Multiplayer
+ {
@ConfigAnnotations.FileComment
public static String _serverFolderNameMode = IMultiplayer.SERVER_FOLDER_NAME_MODE_DESC;
@ConfigAnnotations.Entry
@@ -331,66 +331,67 @@ public class Config
public static String _multiDimensionRequiredSimilarity = IMultiplayer.MULTI_DIMENSION_REQUIRED_SIMILARITY_DESC;
@ConfigAnnotations.Entry
public static double multiDimensionRequiredSimilarity = IMultiplayer.MULTI_DIMENSION_REQUIRED_SIMILARITY_DEFAULT;
+
}
-
-
+
+
public static class Advanced
{
@ConfigAnnotations.ScreenEntry
public static Threading threading;
-
+
@ConfigAnnotations.ScreenEntry
public static Debugging debugging;
-
+
@ConfigAnnotations.ScreenEntry
public static Buffers buffers;
-
-
+
+
public static class Threading
{
@ConfigAnnotations.FileComment
public static String _numberOfWorldGenerationThreads = IThreading.NUMBER_OF_WORLD_GENERATION_THREADS_DESC;
@ConfigAnnotations.Entry(minValue = 1, maxValue = 50)
public static int numberOfWorldGenerationThreads = IThreading.NUMBER_OF_WORLD_GENERATION_THREADS_DEFAULT.defaultValue;
-
+
@ConfigAnnotations.FileComment
public static String _numberOfBufferBuilderThreads = IThreading.NUMBER_OF_BUFFER_BUILDER_THREADS_DESC;
@ConfigAnnotations.Entry(minValue = 1, maxValue = 50)
public static int numberOfBufferBuilderThreads = IThreading.NUMBER_OF_BUFFER_BUILDER_THREADS_MIN_DEFAULT_MAX.defaultValue;
}
-
-
+
+
public static class Debugging
{
@ConfigAnnotations.FileComment
public static String _drawLods = IDebugging.DRAW_LODS_DESC;
@ConfigAnnotations.Entry
public static boolean drawLods = IDebugging.DRAW_LODS_DEFAULT;
-
+
@ConfigAnnotations.FileComment
public static String _debugMode = IDebugging.DEBUG_MODE_DESC;
@ConfigAnnotations.Entry
public static DebugMode debugMode = IDebugging.DEBUG_MODE_DEFAULT;
-
+
@ConfigAnnotations.FileComment
public static String _enableDebugKeybindings = IDebugging.DEBUG_KEYBINDINGS_ENABLED_DESC;
@ConfigAnnotations.Entry
public static boolean enableDebugKeybindings = IDebugging.DEBUG_KEYBINDINGS_ENABLED_DEFAULT;
}
-
-
+
+
public static class Buffers
{
@ConfigAnnotations.FileComment
public static String _gpuUploadMethod = IBuffers.GPU_UPLOAD_METHOD_DESC;
@ConfigAnnotations.Entry
public static GpuUploadMethod gpuUploadMethod = IBuffers.GPU_UPLOAD_METHOD_DEFAULT;
-
+
@ConfigAnnotations.FileComment
public static String _gpuUploadPerMegabyteInMilliseconds = IBuffers.GPU_UPLOAD_PER_MEGABYTE_IN_MILLISECONDS_DESC;
@ConfigAnnotations.Entry(minValue = 0, maxValue = 50)
public static int gpuUploadPerMegabyteInMilliseconds = IBuffers.GPU_UPLOAD_PER_MEGABYTE_IN_MILLISECONDS_DEFAULT.defaultValue;
-
+
@ConfigAnnotations.FileComment
public static String _rebuildTimes = IBuffers.REBUILD_TIMES_DESC;
@ConfigAnnotations.Entry
@@ -398,4 +399,4 @@ public class Config
}
}
}
-}
\ No newline at end of file
+}
diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/chunk/ChunkWrapper.java b/common/src/main/java/com/seibel/lod/common/wrappers/chunk/ChunkWrapper.java
index 89344bb12..556db6e85 100644
--- a/common/src/main/java/com/seibel/lod/common/wrappers/chunk/ChunkWrapper.java
+++ b/common/src/main/java/com/seibel/lod/common/wrappers/chunk/ChunkWrapper.java
@@ -32,21 +32,21 @@ import net.minecraft.world.level.levelgen.Heightmap;
*/
public class ChunkWrapper implements IChunkWrapper
{
- private final ChunkAccess chunk;
- private final LevelReader lightSource;
-
-
- public ChunkWrapper(ChunkAccess chunk, LevelReader lightSource)
- {
- this.chunk = chunk;
- this.lightSource = lightSource;
- }
-
- @Override
- public int getHeight(){
- return chunk.getHeight();
- }
-
+ private final ChunkAccess chunk;
+ private final LevelReader lightSource;
+
+
+ public ChunkWrapper(ChunkAccess chunk, LevelReader lightSource)
+ {
+ this.chunk = chunk;
+ this.lightSource = lightSource;
+ }
+
+ @Override
+ public int getHeight(){
+ return chunk.getHeight();
+ }
+
@Override
public int getMinBuildHeight()
{
@@ -57,32 +57,32 @@ public class ChunkWrapper implements IChunkWrapper
{
return chunk.getMaxBuildHeight();
}
-
- @Override
- public int getHeightMapValue(int xRel, int zRel)
- {
- return chunk.getOrCreateHeightmapUnprimed(WrapperUtil.DEFAULT_HEIGHTMAP).getFirstAvailable(xRel, zRel);
- }
-
- @Override
- public IBiomeWrapper getBiome(int x, int y, int z)
- {
+
+ @Override
+ public int getHeightMapValue(int xRel, int zRel)
+ {
+ return chunk.getOrCreateHeightmapUnprimed(WrapperUtil.DEFAULT_HEIGHTMAP).getFirstAvailable(xRel, zRel);
+ }
+
+ @Override
+ public IBiomeWrapper getBiome(int x, int y, int z)
+ {
#if MC_VERSION_1_18_2
- return BiomeWrapper.getBiomeWrapper(chunk.getNoiseBiome(
- QuartPos.fromBlock(x), QuartPos.fromBlock(y), QuartPos.fromBlock(z)).value());
+ return BiomeWrapper.getBiomeWrapper(chunk.getNoiseBiome(
+ QuartPos.fromBlock(x), QuartPos.fromBlock(y), QuartPos.fromBlock(z)).value());
#elif MC_VERSION_1_18_1
return BiomeWrapper.getBiomeWrapper(chunk.getNoiseBiome(
QuartPos.fromBlock(x), QuartPos.fromBlock(y), QuartPos.fromBlock(z)));
#endif
- }
-
- @Override
- public BlockDetailWrapper getBlockDetail(int x, int y, int z) {
- BlockPos pos = new BlockPos(x,y,z);
- BlockState blockState = chunk.getBlockState(pos);
- BlockDetailWrapper blockDetail = BlockDetailMap.getOrMakeBlockDetailCache(blockState, pos, lightSource);
- return blockDetail == BlockDetailWrapper.NULL_BLOCK_DETAIL ? null : blockDetail;
- }
+ }
+
+ @Override
+ public BlockDetailWrapper getBlockDetail(int x, int y, int z) {
+ BlockPos pos = new BlockPos(x,y,z);
+ BlockState blockState = chunk.getBlockState(pos);
+ BlockDetailWrapper blockDetail = BlockDetailMap.getOrMakeBlockDetailCache(blockState, pos, lightSource);
+ return blockDetail == BlockDetailWrapper.NULL_BLOCK_DETAIL ? null : blockDetail;
+ }
@Override
public BlockDetailWrapper getBlockDetailAtFace(int x, int y, int z, LodDirection dir) {
@@ -99,92 +99,92 @@ public class ChunkWrapper implements IChunkWrapper
BlockDetailWrapper blockDetail = BlockDetailMap.getOrMakeBlockDetailCache(blockState, pos, lightSource);
return blockDetail == BlockDetailWrapper.NULL_BLOCK_DETAIL ? null : blockDetail;
}
-
- public ChunkAccess getChunk() {
- return chunk;
- }
-
- @Override
- public int getChunkPosX(){
- return chunk.getPos().x;
- }
-
- @Override
- public int getChunkPosZ(){
- return chunk.getPos().z;
- }
-
- @Override
- public int getRegionPosX(){
- return LevelPosUtil.convert(LodUtil.CHUNK_DETAIL_LEVEL, chunk.getPos().x, LodUtil.REGION_DETAIL_LEVEL);
- }
-
- @Override
- public int getRegionPosZ(){
- return LevelPosUtil.convert(LodUtil.CHUNK_DETAIL_LEVEL, chunk.getPos().z, LodUtil.REGION_DETAIL_LEVEL);
- }
-
- @Override
- public int getMaxY(int x, int z) {
- return chunk.getHeight(Heightmap.Types.MOTION_BLOCKING, Math.floorMod(x, 16), Math.floorMod(z, 16));
- }
-
- @Override
- public int getMaxX(){
- return chunk.getPos().getMaxBlockX();
- }
- @Override
- public int getMaxZ(){
- return chunk.getPos().getMaxBlockZ();
- }
- @Override
- public int getMinX(){
- return chunk.getPos().getMinBlockX();
- }
- @Override
- public int getMinZ() {
- return chunk.getPos().getMinBlockZ();
- }
-
- @Override
- public long getLongChunkPos() {
- return chunk.getPos().toLong();
- }
-
- @Override
- public boolean isLightCorrect(){
- //return true;
- if (chunk instanceof LevelChunk) {
- return ((LevelChunk) chunk).isClientLightReady();
- }
- return chunk.isLightCorrect();
- }
-
- public boolean isWaterLogged(int x, int y, int z)
- {
- BlockState blockState = chunk.getBlockState(new BlockPos(x,y,z));
-
- //This type of block is always in water
- return (!(blockState.getBlock() instanceof LiquidBlockContainer) && (blockState.getBlock() instanceof SimpleWaterloggedBlock))
- && (blockState.hasProperty(BlockStateProperties.WATERLOGGED) && blockState.getValue(BlockStateProperties.WATERLOGGED));
- }
-
- @Override
- public int getEmittedBrightness(int x, int y, int z)
- {
- return chunk.getLightEmission(new BlockPos(x,y,z));
- }
-
+
+ public ChunkAccess getChunk() {
+ return chunk;
+ }
+
+ @Override
+ public int getChunkPosX(){
+ return chunk.getPos().x;
+ }
+
+ @Override
+ public int getChunkPosZ(){
+ return chunk.getPos().z;
+ }
+
+ @Override
+ public int getRegionPosX(){
+ return LevelPosUtil.convert(LodUtil.CHUNK_DETAIL_LEVEL, chunk.getPos().x, LodUtil.REGION_DETAIL_LEVEL);
+ }
+
+ @Override
+ public int getRegionPosZ(){
+ return LevelPosUtil.convert(LodUtil.CHUNK_DETAIL_LEVEL, chunk.getPos().z, LodUtil.REGION_DETAIL_LEVEL);
+ }
+
+ @Override
+ public int getMaxY(int x, int z) {
+ return chunk.getHeight(Heightmap.Types.MOTION_BLOCKING, Math.floorMod(x, 16), Math.floorMod(z, 16));
+ }
+
+ @Override
+ public int getMaxX(){
+ return chunk.getPos().getMaxBlockX();
+ }
+ @Override
+ public int getMaxZ(){
+ return chunk.getPos().getMaxBlockZ();
+ }
+ @Override
+ public int getMinX(){
+ return chunk.getPos().getMinBlockX();
+ }
+ @Override
+ public int getMinZ() {
+ return chunk.getPos().getMinBlockZ();
+ }
+
+ @Override
+ public long getLongChunkPos() {
+ return chunk.getPos().toLong();
+ }
+
+ @Override
+ public boolean isLightCorrect(){
+ //return true;
+ if (chunk instanceof LevelChunk) {
+ return ((LevelChunk) chunk).isClientLightReady();
+ }
+ return chunk.isLightCorrect();
+ }
+
+ public boolean isWaterLogged(int x, int y, int z)
+ {
+ BlockState blockState = chunk.getBlockState(new BlockPos(x,y,z));
+
+ //This type of block is always in water
+ return (!(blockState.getBlock() instanceof LiquidBlockContainer) && (blockState.getBlock() instanceof SimpleWaterloggedBlock))
+ && (blockState.hasProperty(BlockStateProperties.WATERLOGGED) && blockState.getValue(BlockStateProperties.WATERLOGGED));
+ }
+
+ @Override
+ public int getEmittedBrightness(int x, int y, int z)
+ {
+ return chunk.getLightEmission(new BlockPos(x,y,z));
+ }
+
@Override
public int getBlockLight(int x, int y, int z) {
if (lightSource == null) return -1;
- return lightSource.getBrightness(LightLayer.BLOCK, new BlockPos(x,y,z));
+ return lightSource.getBrightness(LightLayer.BLOCK, new BlockPos(x,y,z));
}
-
+
@Override
public int getSkyLight(int x, int y, int z) {
if (lightSource == null) return -1;
- return lightSource.getBrightness(LightLayer.SKY, new BlockPos(x,y,z));
+ return lightSource.getBrightness(LightLayer.SKY, new BlockPos(x,y,z));
}
@Override
@@ -198,10 +198,10 @@ public class ChunkWrapper implements IChunkWrapper
}
return true;
}
-
+
public LevelReader getColorResolver()
{
return lightSource;
}
-
+
}
diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/config/LodConfigWrapperSingleton.java b/common/src/main/java/com/seibel/lod/common/wrappers/config/LodConfigWrapperSingleton.java
index 202fc6ad7..36a1283ee 100644
--- a/common/src/main/java/com/seibel/lod/common/wrappers/config/LodConfigWrapperSingleton.java
+++ b/common/src/main/java/com/seibel/lod/common/wrappers/config/LodConfigWrapperSingleton.java
@@ -15,47 +15,47 @@ import com.seibel.lod.common.Config;
public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
{
public static final LodConfigWrapperSingleton INSTANCE = new LodConfigWrapperSingleton();
-
-
+
+
private static final Client client = new Client();
@Override
public IClient client()
{
return client;
}
-
+
public static class Client implements IClient
{
public final IGraphics graphics;
public final IWorldGenerator worldGenerator;
public final IMultiplayer multiplayer;
public final IAdvanced advanced;
-
-
+
+
@Override
public IGraphics graphics()
{
return graphics;
}
-
+
@Override
public IWorldGenerator worldGenerator()
{
return worldGenerator;
}
-
+
@Override
public IMultiplayer multiplayer() {
return multiplayer;
}
-
+
@Override
public IAdvanced advanced()
{
return advanced;
}
-
-
+
+
@Override
public boolean getOptionsButton()
{
@@ -67,8 +67,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("optionsButton").value = newOptionsButton;
ConfigGui.editSingleOption.saveOption("optionsButton");
}
-
-
+
+
//================//
// Client Configs //
//================//
@@ -79,8 +79,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
multiplayer = new Multiplayer();
advanced = new Advanced();
}
-
-
+
+
//==================//
// Graphics Configs //
//==================//
@@ -89,36 +89,36 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
public final IQuality quality;
public final IFogQuality fogQuality;
public final IAdvancedGraphics advancedGraphics;
-
-
-
+
+
+
@Override
public IQuality quality()
{
return quality;
}
-
+
@Override
public IFogQuality fogQuality()
{
return fogQuality;
}
-
+
@Override
public IAdvancedGraphics advancedGraphics()
{
return advancedGraphics;
}
-
-
+
+
Graphics()
{
quality = new Quality();
fogQuality = new FogQuality();
advancedGraphics = new AdvancedGraphics();
}
-
-
+
+
public static class Quality implements IQuality
{
@Override
@@ -132,8 +132,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("client.graphics.quality.drawResolution").value = newHorizontalResolution;
ConfigGui.editSingleOption.saveOption("client.graphics.quality.drawResolution");
}
-
-
+
+
@Override
public int getLodChunkRenderDistance()
{
@@ -145,8 +145,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("client.graphics.quality.lodChunkRenderDistance").value = newLodChunkRenderDistance;
ConfigGui.editSingleOption.saveOption("client.graphics.quality.lodChunkRenderDistance");
}
-
-
+
+
@Override
public VerticalQuality getVerticalQuality()
{
@@ -158,8 +158,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("client.graphics.quality.verticalQuality").value = newVerticalQuality;
ConfigGui.editSingleOption.saveOption("client.graphics.quality.verticalQuality");
}
-
-
+
+
@Override
public int getHorizontalScale()
{
@@ -171,8 +171,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("client.graphics.quality.horizontalScale").value = newHorizontalScale;
ConfigGui.editSingleOption.saveOption("client.graphics.quality.horizontalScale");
}
-
-
+
+
@Override
public HorizontalQuality getHorizontalQuality()
{
@@ -206,8 +206,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.saveOption("client.graphics.quality.lodBiomeBlending");
}
}
-
-
+
+
public static class FogQuality implements IFogQuality
{
public final IAdvancedFog advancedFog;
@@ -228,36 +228,36 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("client.graphics.fogQuality.fogDistance").value = newFogDistance;
ConfigGui.editSingleOption.saveOption("client.graphics.fogQuality.fogDistance");
}
-
-
+
+
@Override
public FogDrawMode getFogDrawMode()
{
return Config.Client.Graphics.FogQuality.fogDrawMode;
}
-
+
@Override
public void setFogDrawMode(FogDrawMode setFogDrawMode)
{
ConfigGui.editSingleOption.getEntry("client.graphics.fogQuality.fogDrawMode").value = setFogDrawMode;
ConfigGui.editSingleOption.saveOption("client.graphics.fogQuality.fogDrawMode");
}
-
-
+
+
@Override
public FogColorMode getFogColorMode()
{
return Config.Client.Graphics.FogQuality.fogColorMode;
}
-
+
@Override
public void setFogColorMode(FogColorMode newFogColorMode)
{
ConfigGui.editSingleOption.getEntry("client.graphics.fogQuality.fogColorMode").value = newFogColorMode;
ConfigGui.editSingleOption.saveOption("client.graphics.fogQuality.fogColorMode");
}
-
-
+
+
@Override
public boolean getDisableVanillaFog()
{
@@ -431,8 +431,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
}
}
-
-
+
+
public static class AdvancedGraphics implements IAdvancedGraphics
{
@Override
@@ -446,8 +446,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("client.graphics.advancedGraphics.disableDirectionalCulling").value = newDisableDirectionalCulling;
ConfigGui.editSingleOption.saveOption("client.graphics.advancedGraphics.disableDirectionalCulling");
}
-
-
+
+
@Override
public VanillaOverdraw getVanillaOverdraw()
{
@@ -507,13 +507,12 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("client.graphics.advancedGraphics.saturationMultiplier").value = newSaturationMultiplier;
ConfigGui.editSingleOption.saveOption("client.graphics.advancedGraphics.saturationMultiplier");
}
-
}
}
-
-
-
-
+
+
+
+
//========================//
// WorldGenerator Configs //
//========================//
@@ -530,8 +529,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("client.worldGenerator.generationPriority").value = newGenerationPriority;
ConfigGui.editSingleOption.saveOption("client.worldGenerator.generationPriority");
}
-
-
+
+
@Override
public DistanceGenerationMode getDistanceGenerationMode()
{
@@ -556,8 +555,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("client.worldGenerator.allowUnstableFeatureGeneration").value = newAllowUnstableFeatureGeneration;
ConfigGui.editSingleOption.saveOption("client.worldGenerator.allowUnstableFeatureGeneration");
}*/
-
-
+
+
@Override
public BlocksToAvoid getBlocksToAvoid()
{
@@ -592,9 +591,9 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.saveOption("client.worldGenerator.lightGenerationMode");
}
}
-
-
-
+
+
+
//=====================//
// Multiplayer Configs //
//=====================//
@@ -625,9 +624,9 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.saveOption("client.multiplayer.multiDimensionMinimumSimilarityPercent");
}
}
-
-
-
+
+
+
//============================//
// AdvancedModOptions Configs //
//============================//
@@ -636,36 +635,36 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
public final IThreading threading;
public final IDebugging debugging;
public final IBuffers buffers;
-
-
+
+
@Override
public IThreading threading()
{
return threading;
}
-
-
+
+
@Override
public IDebugging debugging()
{
return debugging;
}
-
-
+
+
@Override
public IBuffers buffers()
{
return buffers;
}
-
-
+
+
public Advanced()
{
threading = new Threading();
debugging = new Debugging();
buffers = new Buffers();
}
-
+
public static class Threading implements IThreading
{
@Override
@@ -679,8 +678,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("client.advanced.threading.numberOfWorldGenerationThreads").value = newNumberOfWorldGenerationThreads;
ConfigGui.editSingleOption.saveOption("client.advanced.threading.numberOfWorldGenerationThreads");
}
-
-
+
+
@Override
public int getNumberOfBufferBuilderThreads()
{
@@ -693,10 +692,10 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.saveOption("client.advanced.threading.numberOfBufferBuilderThreads");
}
}
-
-
-
-
+
+
+
+
//===============//
// Debug Options //
//===============//
@@ -713,8 +712,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("client.advanced.debugging.drawLods").value = newDrawLods;
ConfigGui.editSingleOption.saveOption("client.advanced.debugging.drawLods");
}
-
-
+
+
@Override
public DebugMode getDebugMode()
{
@@ -726,8 +725,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugMode").value = newDebugMode;
ConfigGui.editSingleOption.saveOption("client.advanced.debugging.debugMode");
}
-
-
+
+
@Override
public boolean getDebugKeybindingsEnabled()
{
@@ -740,11 +739,11 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.saveOption("client.advanced.debugging.enableDebugKeybindings");
}
}
-
-
+
+
public static class Buffers implements IBuffers
{
-
+
@Override
public GpuUploadMethod getGpuUploadMethod()
{
@@ -756,8 +755,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("client.advanced.buffers.gpuUploadMethod").value = newDisableVanillaFog;
ConfigGui.editSingleOption.saveOption("client.advanced.buffers.gpuUploadMethod");
}
-
-
+
+
@Override
public int getGpuUploadPerMegabyteInMilliseconds()
{
@@ -768,8 +767,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
ConfigGui.editSingleOption.getEntry("client.advanced.buffers.gpuUploadPerMegabyteInMilliseconds").value = newMilliseconds;
ConfigGui.editSingleOption.saveOption("client.advanced.buffers.gpuUploadPerMegabyteInMilliseconds");
}
-
-
+
+
@Override
public BufferRebuildTimes getRebuildTimes()
{
diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftRenderWrapper.java b/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftRenderWrapper.java
index c136c7f86..c2d158073 100644
--- a/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftRenderWrapper.java
+++ b/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftRenderWrapper.java
@@ -54,96 +54,96 @@ import net.minecraft.world.phys.Vec3;
*/
public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
{
- public static final MinecraftRenderWrapper INSTANCE = new MinecraftRenderWrapper();
-
- private static final Minecraft MC = Minecraft.getInstance();
- private static final GameRenderer GAME_RENDERER = MC.gameRenderer;
- private static final IWrapperFactory FACTORY = WrapperFactory.INSTANCE;
-
- @Override
- public Vec3f getLookAtVector()
- {
- Camera camera = GAME_RENDERER.getMainCamera();
- Vector3f cameraDir = camera.getLookVector();
- return new Vec3f(cameraDir.x(), cameraDir.y(), cameraDir.z());
- }
-
- @Override
- public AbstractBlockPosWrapper getCameraBlockPosition()
- {
- Camera camera = GAME_RENDERER.getMainCamera();
- BlockPos blockPos = camera.getBlockPosition();
- return new BlockPosWrapper(blockPos.getX(), blockPos.getY(), blockPos.getZ());
- }
-
- @Override
- public boolean playerHasBlindnessEffect()
- {
- return MC.player.getActiveEffectsMap().get(MobEffects.BLINDNESS) != null;
- }
-
- @Override
- public Vec3d getCameraExactPosition()
- {
- Camera camera = GAME_RENDERER.getMainCamera();
- Vec3 projectedView = camera.getPosition();
-
- return new Vec3d(projectedView.x, projectedView.y, projectedView.z);
- }
-
- @Override
- public Mat4f getDefaultProjectionMatrix(float partialTicks)
- {
- return McObjectConverter.Convert(GAME_RENDERER.getProjectionMatrix(GAME_RENDERER.getFov(GAME_RENDERER.getMainCamera(), partialTicks, true)));
- }
-
- @Override
- public double getGamma()
- {
- return MC.options.gamma;
- }
-
- @Override
- public Color getFogColor(float partialTicks) {
- FogRenderer.setupColor(GAME_RENDERER.getMainCamera(), partialTicks, MC.level, 1, GAME_RENDERER.getDarkenWorldAmount(partialTicks));
- float[] colorValues = RenderSystem.getShaderFogColor();
- return new Color(colorValues[0], colorValues[1], colorValues[2], colorValues[3]);
- }
- // getSpecialFogColor() is the same as getFogColor()
-
- @Override
- public Color getSkyColor() {
- if (MC.level.dimensionType().hasSkyLight()) {
- Vec3 colorValues = MC.level.getSkyColor(MC.gameRenderer.getMainCamera().getPosition(), MC.getFrameTime());
- return new Color((float) colorValues.x, (float) colorValues.y, (float) colorValues.z);
- } else
- return new Color(0, 0, 0);
- }
-
- @Override
- public double getFov(float partialTicks)
- {
- return GAME_RENDERER.getFov(GAME_RENDERER.getMainCamera(), partialTicks, true);
- }
-
- /** Measured in chunks */
- @Override
- public int getRenderDistance()
- {
+ public static final MinecraftRenderWrapper INSTANCE = new MinecraftRenderWrapper();
+
+ private static final Minecraft MC = Minecraft.getInstance();
+ private static final GameRenderer GAME_RENDERER = MC.gameRenderer;
+ private static final IWrapperFactory FACTORY = WrapperFactory.INSTANCE;
+
+ @Override
+ public Vec3f getLookAtVector()
+ {
+ Camera camera = GAME_RENDERER.getMainCamera();
+ Vector3f cameraDir = camera.getLookVector();
+ return new Vec3f(cameraDir.x(), cameraDir.y(), cameraDir.z());
+ }
+
+ @Override
+ public AbstractBlockPosWrapper getCameraBlockPosition()
+ {
+ Camera camera = GAME_RENDERER.getMainCamera();
+ BlockPos blockPos = camera.getBlockPosition();
+ return new BlockPosWrapper(blockPos.getX(), blockPos.getY(), blockPos.getZ());
+ }
+
+ @Override
+ public boolean playerHasBlindnessEffect()
+ {
+ return MC.player.getActiveEffectsMap().get(MobEffects.BLINDNESS) != null;
+ }
+
+ @Override
+ public Vec3d getCameraExactPosition()
+ {
+ Camera camera = GAME_RENDERER.getMainCamera();
+ Vec3 projectedView = camera.getPosition();
+
+ return new Vec3d(projectedView.x, projectedView.y, projectedView.z);
+ }
+
+ @Override
+ public Mat4f getDefaultProjectionMatrix(float partialTicks)
+ {
+ return McObjectConverter.Convert(GAME_RENDERER.getProjectionMatrix(GAME_RENDERER.getFov(GAME_RENDERER.getMainCamera(), partialTicks, true)));
+ }
+
+ @Override
+ public double getGamma()
+ {
+ return MC.options.gamma;
+ }
+
+ @Override
+ public Color getFogColor(float partialTicks) {
+ FogRenderer.setupColor(GAME_RENDERER.getMainCamera(), partialTicks, MC.level, 1, GAME_RENDERER.getDarkenWorldAmount(partialTicks));
+ float[] colorValues = RenderSystem.getShaderFogColor();
+ return new Color(colorValues[0], colorValues[1], colorValues[2], colorValues[3]);
+ }
+ // getSpecialFogColor() is the same as getFogColor()
+
+ @Override
+ public Color getSkyColor() {
+ if (MC.level.dimensionType().hasSkyLight()) {
+ Vec3 colorValues = MC.level.getSkyColor(MC.gameRenderer.getMainCamera().getPosition(), MC.getFrameTime());
+ return new Color((float) colorValues.x, (float) colorValues.y, (float) colorValues.z);
+ } else
+ return new Color(0, 0, 0);
+ }
+
+ @Override
+ public double getFov(float partialTicks)
+ {
+ return GAME_RENDERER.getFov(GAME_RENDERER.getMainCamera(), partialTicks, true);
+ }
+
+ /** Measured in chunks */
+ @Override
+ public int getRenderDistance()
+ {
return MC.options.getEffectiveRenderDistance();
- }
-
- @Override
- public int getScreenWidth()
- {
- return MC.getWindow().getWidth();
- }
- @Override
- public int getScreenHeight()
- {
- return MC.getWindow().getHeight();
- }
-
+ }
+
+ @Override
+ public int getScreenWidth()
+ {
+ return MC.getWindow().getWidth();
+ }
+ @Override
+ public int getScreenHeight()
+ {
+ return MC.getWindow().getHeight();
+ }
+
private RenderTarget getRenderTarget() {
RenderTarget r = null; //MC.levelRenderer.getCloudsTarget();
return r!=null ? r : MC.getMainRenderTarget();
@@ -164,12 +164,12 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
return getRenderTarget().viewHeight;
}
- /**
- * This method returns the ChunkPos of all chunks that Minecraft
- * is going to render this frame.
- *
- */
-
+ /**
+ * This method returns the ChunkPos of all chunks that Minecraft
+ * is going to render this frame.
+ *
+ */
+
public boolean usingBackupGetVanillaRenderedChunks = true;
@Override
public HashSet