aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java b/src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java
index 13b34da..7f2e5d2 100644
--- a/src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java
+++ b/src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java
@@ -25,10 +25,12 @@ public class InputUtils {
}
public static int mouseX() {
+ if (OneConfigGui.INSTANCE == null) return Mouse.getX();
return (int) (Mouse.getX() / OneConfigGui.INSTANCE.getScaleFactor());
}
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());
}
}