aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/hud
diff options
context:
space:
mode:
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);