Add CaveCullingHeight + 'Fun' mode into config
This commit is contained in:
@@ -29,6 +29,7 @@ import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.I
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IGraphics.IFogQuality.IAdvancedFog.IHeightFog;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IMultiplayer;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IWorldGenerator;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IAdvanced;
|
||||
|
||||
|
||||
/**
|
||||
@@ -283,6 +284,11 @@ public class Config
|
||||
@ConfigAnnotations.Entry
|
||||
public static boolean enableCaveCulling = IAdvancedGraphics.ENABLE_CAVE_CULLING_DEFAULT;
|
||||
|
||||
@ConfigAnnotations.FileComment
|
||||
public static String _caveCullingHeight = IAdvancedGraphics.CAVE_CULLING_HEIGHT_DESC;
|
||||
@ConfigAnnotations.Entry(minValue = -4096, maxValue = 4096)
|
||||
public static int caveCullingHeight = IAdvancedGraphics.CAVE_CULLING_HEIGHT_MIN_DEFAULT_MAX.defaultValue;
|
||||
|
||||
/*
|
||||
@ConfigAnnotations.FileComment
|
||||
public static String _backsideCullingRange = IAdvancedGraphics.VANILLA_CULLING_RANGE_DESC;
|
||||
@@ -355,8 +361,13 @@ public class Config
|
||||
|
||||
@ConfigAnnotations.ScreenEntry
|
||||
public static Buffers buffers;
|
||||
|
||||
|
||||
|
||||
@ConfigAnnotations.FileComment
|
||||
public static String _lodOnlyMode = IAdvanced.LOD_ONLY_MODE_DESC;
|
||||
@ConfigAnnotations.Entry
|
||||
public static boolean lodOnlyMode = IAdvanced.LOD_ONLY_MODE_DEFAULT;
|
||||
|
||||
|
||||
public static class Threading
|
||||
{
|
||||
@ConfigAnnotations.FileComment
|
||||
|
||||
+26
-2
@@ -530,6 +530,18 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.advancedGraphics.enableCaveCulling");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCaveCullingHeight() {
|
||||
return Config.Client.Graphics.AdvancedGraphics.caveCullingHeight;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCaveCullingHeight(int newCaveCullingHeight) {
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.advancedGraphics.caveCullingHeight").value = newCaveCullingHeight;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.advancedGraphics.caveCullingHeight");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -679,8 +691,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
{
|
||||
return buffers;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Advanced()
|
||||
{
|
||||
threading = new Threading();
|
||||
@@ -804,6 +816,18 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
ConfigGui.editSingleOption.saveOption("client.advanced.buffers.newBufferRebuildTimes");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getLodOnlyMode() {
|
||||
return Config.Client.Advanced.lodOnlyMode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLodOnlyMode(boolean newLodOnlyMode) {
|
||||
ConfigGui.editSingleOption.getEntry("client.advanced.buffers.lodOnlyMode").value = newLodOnlyMode;
|
||||
ConfigGui.editSingleOption.saveOption("client.advanced.buffers.lodOnlyMode");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
Submodule core updated: 4a2a6fb4bd...95c5854d8f
@@ -21,6 +21,7 @@ package com.seibel.lod.fabric.mixins;
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.math.Matrix4f;
|
||||
import com.seibel.lod.common.Config;
|
||||
import com.seibel.lod.common.wrappers.McObjectConverter;
|
||||
import com.seibel.lod.core.api.ClientApi;
|
||||
import com.seibel.lod.core.objects.math.Mat4f;
|
||||
@@ -61,6 +62,7 @@ public class MixinWorldRenderer
|
||||
previousPartialTicks = tickDelta;
|
||||
}
|
||||
|
||||
/* Inject rendering at renderSky
|
||||
// HEAD or RETURN
|
||||
@Inject(at = @At("RETURN"),
|
||||
method = "renderSky",
|
||||
@@ -73,10 +75,9 @@ public class MixinWorldRenderer
|
||||
|
||||
ClientApi.INSTANCE.renderLods(mcModelViewMatrix, mcProjectionMatrix, previousPartialTicks);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
}*/
|
||||
|
||||
// Inject rendering at first call to renderChunkLayer
|
||||
// HEAD or RETURN
|
||||
@Inject(at = @At("HEAD"),
|
||||
method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLcom/mojang/math/Matrix4f;)V",
|
||||
@@ -91,6 +92,8 @@ public class MixinWorldRenderer
|
||||
|
||||
ClientApi.INSTANCE.renderLods(mcModelViewMatrix, mcProjectionMatrix, previousPartialTicks);
|
||||
}
|
||||
//callback.cancel();
|
||||
}*/
|
||||
if (Config.Client.Advanced.lodOnlyMode) {
|
||||
callback.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ package com.seibel.lod.forge.mixins;
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.math.Matrix4f;
|
||||
import com.seibel.lod.common.Config;
|
||||
import com.seibel.lod.common.wrappers.McObjectConverter;
|
||||
import com.seibel.lod.core.api.ClientApi;
|
||||
import com.seibel.lod.core.objects.math.Mat4f;
|
||||
@@ -61,7 +62,9 @@ public class MixinWorldRenderer
|
||||
}
|
||||
|
||||
// HEAD or RETURN
|
||||
@Inject(at = @At("HEAD"), method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLcom/mojang/math/Matrix4f;)V")
|
||||
@Inject(at = @At("HEAD"),
|
||||
method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLcom/mojang/math/Matrix4f;)V",
|
||||
cancellable = true)
|
||||
private void renderChunkLayer(RenderType renderType, PoseStack modelViewMatrixStack, double cameraXBlockPos, double cameraYBlockPos, double cameraZBlockPos, Matrix4f projectionMatrix, CallbackInfo callback)
|
||||
{
|
||||
// only render before solid blocks
|
||||
@@ -72,5 +75,8 @@ public class MixinWorldRenderer
|
||||
|
||||
ClientApi.INSTANCE.renderLods(mcModelViewMatrix, mcProjectionMatrix, previousPartialTicks);
|
||||
}
|
||||
if (Config.Client.Advanced.lodOnlyMode) {
|
||||
callback.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user