Custom fog option (#74)
This commit is contained in:
parent
e013f80912
commit
74a156389e
4 changed files with 18 additions and 2 deletions
|
@ -26,6 +26,10 @@ public class CustomFogRenderer {
|
||||||
private static float fogEnd = 192;
|
private static float fogEnd = 192;
|
||||||
|
|
||||||
public static boolean applyFogDensity(Camera camera, float viewDistance, boolean thickFog) {
|
public static boolean applyFogDensity(Camera camera, float viewDistance, boolean thickFog) {
|
||||||
|
if (!Configs.CLIENT_CONFIG.renderCustomFog()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
FogType fogType = camera.getFluidInCamera();
|
FogType fogType = camera.getFluidInCamera();
|
||||||
if (fogType != FogType.NONE) {
|
if (fogType != FogType.NONE) {
|
||||||
BackgroundInfo.fogDensity = 1;
|
BackgroundInfo.fogDensity = 1;
|
||||||
|
|
|
@ -21,6 +21,8 @@ public class ClientConfig extends NamedPathConfig {
|
||||||
@ConfigUI(topPadding = 12)
|
@ConfigUI(topPadding = 12)
|
||||||
public static final ConfigToken<Boolean> DEBUG_HASHES = ConfigToken.Boolean(false, "debugHashes", AutoSync.SYNC_CATEGORY);
|
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)
|
@ConfigUI(leftPadding = 8)
|
||||||
public static final ConfigToken<Boolean> NETHER_THICK_FOG = ConfigToken.Boolean(true, "netherThickFog", "rendering");
|
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() {
|
public boolean netherThickFog() {
|
||||||
return get(NETHER_THICK_FOG);
|
return get(NETHER_THICK_FOG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean renderCustomFog() {
|
||||||
|
return get(CUSTOM_FOG_RENDERING);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,5 +51,8 @@
|
||||||
"message.bclib.datafixer.progress": "Applying all Patches to your World.",
|
"message.bclib.datafixer.progress": "Applying all Patches to your World.",
|
||||||
"title.bclib.datafixer.error": "Errors while fixing World",
|
"title.bclib.datafixer.error": "Errors while fixing World",
|
||||||
"message.bclib.datafixer.error": "There were errors while repairing the world. This means that this level is probably in an inconsistent state and you should not play it. Please restore your backup and fix the errors below before trying again.",
|
"message.bclib.datafixer.error": "There were errors while repairing the world. This means that this level is probably in an inconsistent state and you should not play it. Please restore your backup and fix the errors below before trying again.",
|
||||||
"title.bclib.datafixer.error.continue": "Fortfahren und als behoben markieren"
|
"title.bclib.datafixer.error.continue": "Proceed and mark as fixed",
|
||||||
|
|
||||||
|
"title.config.bclib.client.rendering.customFogRendering": "Custom Fog Rendering",
|
||||||
|
"title.config.bclib.client.rendering.netherThickFog": "Nether Thick Fog"
|
||||||
}
|
}
|
|
@ -51,5 +51,8 @@
|
||||||
"message.bclib.datafixer.progress": "Применение всех патчей к вашему миру.",
|
"message.bclib.datafixer.progress": "Применение всех патчей к вашему миру.",
|
||||||
"title.bclib.datafixer.error": "Ошибки при исправлении мира",
|
"title.bclib.datafixer.error": "Ошибки при исправлении мира",
|
||||||
"message.bclib.datafixer.error": "Были ошибки при восстановлении мира. Это означает, что этот мир, вероятно, находится в несогласованном состоянии, и вам не следует играть в него. Прежде чем повторить попытку, восстановите резервную копию и исправьте ошибки, указанные ниже.",
|
"message.bclib.datafixer.error": "Были ошибки при восстановлении мира. Это означает, что этот мир, вероятно, находится в несогласованном состоянии, и вам не следует играть в него. Прежде чем повторить попытку, восстановите резервную копию и исправьте ошибки, указанные ниже.",
|
||||||
"title.bclib.datafixer.error.continue": "Продолжить и отметить как исправленное"
|
"title.bclib.datafixer.error.continue": "Продолжить и отметить как исправленное",
|
||||||
|
|
||||||
|
"title.config.bclib.client.rendering.customFogRendering": "Пользовательский рендеринг тумана",
|
||||||
|
"title.config.bclib.client.rendering.netherThickFog": "Плотный туман в Нижнем мире"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue