diff options
Diffstat (limited to 'src/main/java/makamys/neodymium/util/OFUtil.java')
-rw-r--r-- | src/main/java/makamys/neodymium/util/OFUtil.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/makamys/neodymium/util/OFUtil.java b/src/main/java/makamys/neodymium/util/OFUtil.java index a26177f..c98a651 100644 --- a/src/main/java/makamys/neodymium/util/OFUtil.java +++ b/src/main/java/makamys/neodymium/util/OFUtil.java @@ -1,6 +1,8 @@ package makamys.neodymium.util; import makamys.neodymium.MixinConfigPlugin; +import makamys.neodymium.ducks.IMixinGameSettings_OptiFine; +import net.minecraft.client.Minecraft; public class OFUtil { private static boolean isOptiFinePresent = MixinConfigPlugin.class.getResource("/optifine/OptiFineTweaker.class") != null; @@ -8,4 +10,12 @@ public class OFUtil { public static boolean isOptiFinePresent() { return isOptiFinePresent; } + + public static boolean isFogOff() { + return isOptiFinePresent && getIsFogOff(); + } + + private static boolean getIsFogOff() { + return ((IMixinGameSettings_OptiFine)Minecraft.getMinecraft().gameSettings).getOfFogType() == 3; + } } |