Use fog density config
This commit is contained in:
parent
2549ab810f
commit
56771daea9
2 changed files with 12 additions and 1 deletions
|
@ -4,9 +4,11 @@ import ru.betterend.config.Configs;
|
|||
|
||||
public class ClientOptions {
|
||||
private static boolean customSky;
|
||||
private static boolean useFogDensity;
|
||||
|
||||
public static void init() {
|
||||
setCustomSky(Configs.CLENT_CONFIG.getBooleanRoot("customSky", true));
|
||||
setUseFogDensity(Configs.CLENT_CONFIG.getBooleanRoot("useFogDensity", true));
|
||||
Configs.CLENT_CONFIG.saveChanges();
|
||||
}
|
||||
|
||||
|
@ -17,4 +19,12 @@ public class ClientOptions {
|
|||
public static void setCustomSky(boolean customSky) {
|
||||
ClientOptions.customSky = customSky;
|
||||
}
|
||||
|
||||
public static boolean useFogDensity() {
|
||||
return useFogDensity;
|
||||
}
|
||||
|
||||
public static void setUseFogDensity(boolean useFogDensity) {
|
||||
ClientOptions.useFogDensity = useFogDensity;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import net.minecraft.util.math.MathHelper;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.Biome.Category;
|
||||
import ru.betterend.client.ClientOptions;
|
||||
import ru.betterend.registry.EndBiomes;
|
||||
import ru.betterend.util.BackgroundInfo;
|
||||
import ru.betterend.world.biome.EndBiome;
|
||||
|
@ -72,7 +73,7 @@ public class BackgroundRendererMixin {
|
|||
Entity entity = camera.getFocusedEntity();
|
||||
Biome biome = entity.world.getBiome(entity.getBlockPos());
|
||||
FluidState fluidState = camera.getSubmergedFluidState();
|
||||
if (biome.getCategory() == Category.THEEND && fluidState.isEmpty()) {
|
||||
if (ClientOptions.useFogDensity() && biome.getCategory() == Category.THEEND && fluidState.isEmpty()) {
|
||||
EndBiome endBiome = EndBiomes.getRenderBiome(biome);
|
||||
|
||||
if (fogDensity == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue