diff options
author | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-05-10 20:19:07 +0100 |
---|---|---|
committer | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-05-10 20:19:07 +0100 |
commit | cefe13f6c232ed5ca2d458b896a76df2ee25a8a3 (patch) | |
tree | d64f34e2ee55124ce9c3469fea9333d94ccfb23f /src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java | |
parent | b5a1aea2239b0beace4d4407d2ab75294c6eab12 (diff) | |
parent | 3872c0ae8746e69671ac9b44ff94dc3c7b194817 (diff) | |
download | OneConfig-cefe13f6c232ed5ca2d458b896a76df2ee25a8a3.tar.gz OneConfig-cefe13f6c232ed5ca2d458b896a76df2ee25a8a3.tar.bz2 OneConfig-cefe13f6c232ed5ca2d458b896a76df2ee25a8a3.zip |
reduce dependency on minecraft + stuff
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java b/src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java index 7f2e5d2..80f5175 100644 --- a/src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java +++ b/src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java @@ -1,7 +1,7 @@ package cc.polyfrost.oneconfig.utils; +import cc.polyfrost.oneconfig.OneConfig; import cc.polyfrost.oneconfig.gui.OneConfigGui; -import net.minecraft.client.Minecraft; import org.lwjgl.input.Mouse; public class InputUtils { @@ -30,7 +30,7 @@ public class InputUtils { } public static int mouseY() { - if (OneConfigGui.INSTANCE == null) return Minecraft.getMinecraft().displayHeight - Math.abs(Mouse.getY()); - return (int) ((Minecraft.getMinecraft().displayHeight - Math.abs(Mouse.getY())) / OneConfigGui.INSTANCE.getScaleFactor()); + if (OneConfigGui.INSTANCE == null) return OneConfig.getDisplayHeight() - Math.abs(Mouse.getY()); + return (int) ((OneConfig.getDisplayHeight() - Math.abs(Mouse.getY())) / OneConfigGui.INSTANCE.getScaleFactor()); } } |