Custom fog option (#74)

This commit is contained in:
paulevsGitch 2022-02-27 20:04:35 +03:00
parent e013f80912
commit 74a156389e
4 changed files with 18 additions and 2 deletions

View file

@ -26,6 +26,10 @@ public class CustomFogRenderer {
private static float fogEnd = 192;
public static boolean applyFogDensity(Camera camera, float viewDistance, boolean thickFog) {
if (!Configs.CLIENT_CONFIG.renderCustomFog()) {
return false;
}
FogType fogType = camera.getFluidInCamera();
if (fogType != FogType.NONE) {
BackgroundInfo.fogDensity = 1;

View file

@ -21,6 +21,8 @@ public class ClientConfig extends NamedPathConfig {
@ConfigUI(topPadding = 12)
public static final ConfigToken<Boolean> DEBUG_HASHES = ConfigToken.Boolean(false, "debugHashes", AutoSync.SYNC_CATEGORY);
@ConfigUI(leftPadding = 8)
public static final ConfigToken<Boolean> CUSTOM_FOG_RENDERING = ConfigToken.Boolean(true, "customFogRendering", "rendering");
@ConfigUI(leftPadding = 8)
public static final ConfigToken<Boolean> NETHER_THICK_FOG = ConfigToken.Boolean(true, "netherThickFog", "rendering");
@ -59,4 +61,8 @@ public class ClientConfig extends NamedPathConfig {
public boolean netherThickFog() {
return get(NETHER_THICK_FOG);
}
public boolean renderCustomFog() {
return get(CUSTOM_FOG_RENDERING);
}
}