aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/neodymium/util/OFUtil.java
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-07-15 19:27:58 +0200
committermakamys <makamys@outlook.com>2022-07-15 19:53:08 +0200
commite9b96c435214fb6125875ee015f8efedf9b0be07 (patch)
treebc9551566cf8921a26719b026c51e8ab6e29f386 /src/main/java/makamys/neodymium/util/OFUtil.java
parent0c9070cf93b660b29b98c0916f319f3f7b3e1583 (diff)
downloadNeodymium-e9b96c435214fb6125875ee015f8efedf9b0be07.tar.gz
Neodymium-e9b96c435214fb6125875ee015f8efedf9b0be07.tar.bz2
Neodymium-e9b96c435214fb6125875ee015f8efedf9b0be07.zip
O(O)F
Diffstat (limited to 'src/main/java/makamys/neodymium/util/OFUtil.java')
-rw-r--r--src/main/java/makamys/neodymium/util/OFUtil.java10
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;
+ }
}