From a94cdd4331f2d7aa275745c0e44d16bbe69492a1 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 26 Feb 2023 15:47:46 +0100 Subject: Using GuiRenderEvent.GameOverlayRenderEvent instead of RenderGameOverlayEvent. --- src/main/java/at/hannibal2/skyhanni/data/SendTitleHelper.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/data/SendTitleHelper.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/data/SendTitleHelper.kt b/src/main/java/at/hannibal2/skyhanni/data/SendTitleHelper.kt index f0abb1427..ec7f0b5ae 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SendTitleHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SendTitleHelper.kt @@ -1,10 +1,10 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.config.core.util.render.TextRenderUtils +import at.hannibal2.skyhanni.events.GuiRenderEvent import net.minecraft.client.Minecraft import net.minecraft.client.gui.ScaledResolution import net.minecraft.client.renderer.GlStateManager -import net.minecraftforge.client.event.RenderGameOverlayEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class SendTitleHelper { @@ -20,9 +20,7 @@ class SendTitleHelper { } @SubscribeEvent - fun onRenderOverlay(event: RenderGameOverlayEvent.Post) { - if (event.type != RenderGameOverlayEvent.ElementType.ALL) return - + fun onRenderOverlay(event: GuiRenderEvent.GameOverlayRenderEvent) { if (System.currentTimeMillis() > endTime) return val scaledResolution = ScaledResolution(Minecraft.getMinecraft()) -- cgit