aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/hud
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-05-27 23:39:11 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-05-27 23:39:11 +0700
commitf1509146f504707dfab3e9abac36038f94040b64 (patch)
treec1bc7b68627aa43692ba732a75841ef545afa61f /src/main/java/cc/polyfrost/oneconfig/hud
parent358d5ca1a93b07003c5f45c30364de27a7fc101d (diff)
downloadOneConfig-f1509146f504707dfab3e9abac36038f94040b64.tar.gz
OneConfig-f1509146f504707dfab3e9abac36038f94040b64.tar.bz2
OneConfig-f1509146f504707dfab3e9abac36038f94040b64.zip
universal events
add mixinextras and keventbus
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/hud')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/hud/HudCore.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/hud/HudCore.java b/src/main/java/cc/polyfrost/oneconfig/hud/HudCore.java
index 87336e9..200d403 100644
--- a/src/main/java/cc/polyfrost/oneconfig/hud/HudCore.java
+++ b/src/main/java/cc/polyfrost/oneconfig/hud/HudCore.java
@@ -1,8 +1,8 @@
package cc.polyfrost.oneconfig.hud;
+import cc.polyfrost.oneconfig.events.event.HudRenderEvent;
+import cc.polyfrost.oneconfig.libs.eventbus.Subscribe;
import cc.polyfrost.oneconfig.libs.universal.UResolution;
-import net.minecraftforge.client.event.RenderGameOverlayEvent;
-import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import java.util.ArrayList;
@@ -10,9 +10,9 @@ public class HudCore {
public static ArrayList<BasicHud> huds = new ArrayList<>();
public static boolean editing = false;
- @SubscribeEvent
- public void onRender(RenderGameOverlayEvent.Post event) {
- if (event.type != RenderGameOverlayEvent.ElementType.ALL || editing) return;
+ @Subscribe
+ public void onRender(HudRenderEvent event) {
+ if (editing) return;
for (BasicHud hud : huds) {
if (hud.enabled)
hud.drawAll(hud.getXScaled(UResolution.getScaledWidth()), hud.getYScaled(UResolution.getScaledHeight()), hud.scale, true);