aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/hud
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-05-14 00:59:25 -0700
committerGitHub <noreply@github.com>2022-05-14 09:59:25 +0200
commit2c592090b9448203559e01326bc2c2d995b15d53 (patch)
tree821d347aefc828c214d817c8b7be8cf3c0b0ea9f /src/main/java/cc/polyfrost/oneconfig/hud
parent4b8f98aa1435817c13e7083e30896ef8b5cbdaf0 (diff)
downloadOneConfig-2c592090b9448203559e01326bc2c2d995b15d53.tar.gz
OneConfig-2c592090b9448203559e01326bc2c2d995b15d53.tar.bz2
OneConfig-2c592090b9448203559e01326bc2c2d995b15d53.zip
de-minecraftify a lot of things + use mixin instead of reflection (#11)
* de-minecraftify * use mixin instead of reflection * lol
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/hud')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/hud/HudCore.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/hud/HudCore.java b/src/main/java/cc/polyfrost/oneconfig/hud/HudCore.java
index 08baaee..f307349 100644
--- a/src/main/java/cc/polyfrost/oneconfig/hud/HudCore.java
+++ b/src/main/java/cc/polyfrost/oneconfig/hud/HudCore.java
@@ -1,6 +1,6 @@
package cc.polyfrost.oneconfig.hud;
-import cc.polyfrost.oneconfig.OneConfig;
+import gg.essential.universal.UResolution;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@@ -13,9 +13,8 @@ public class HudCore {
@SubscribeEvent
public void onRender(RenderGameOverlayEvent.Post event) {
if (event.type != RenderGameOverlayEvent.ElementType.ALL || editing) return;
- int[] sr = OneConfig.getScaledResolution();
for (BasicHud hud : huds) {
- if(hud.enabled) hud.drawAll(hud.getXScaled(sr[0]), hud.getYScaled(sr[1]), hud.scale, true);
+ if(hud.enabled) hud.drawAll(hud.getXScaled(UResolution.getScaledWidth()), hud.getYScaled(UResolution.getScaledHeight()), hud.scale, true);
}
}
}