From 6ae9df1204cac900b04008b47ebbfe72d59db9f2 Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Tue, 31 Mar 2020 23:16:21 +0100 Subject: [PATCH] Only receive RenderGameOverlayEvent.Post, and only process when it will actually draw something --- .../electroblob/wizardry/client/gui/GuiSpellDisplay.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/electroblob/wizardry/client/gui/GuiSpellDisplay.java b/src/main/java/electroblob/wizardry/client/gui/GuiSpellDisplay.java index 85e2aa61..e511c6f1 100644 --- a/src/main/java/electroblob/wizardry/client/gui/GuiSpellDisplay.java +++ b/src/main/java/electroblob/wizardry/client/gui/GuiSpellDisplay.java @@ -96,7 +96,10 @@ public class GuiSpellDisplay { // Normally when extending Gui, you'd have to have an instance to access its methods. However, we're not actually // using any of them, so this class may as well not bother and just be a static event handler. Neat! @SubscribeEvent - public static void draw(RenderGameOverlayEvent event){ + public static void draw(RenderGameOverlayEvent.Post event){ + + if(event.getType() != RenderGameOverlayEvent.ElementType.TEXT + && event.getType() != RenderGameOverlayEvent.ElementType.HOTBAR) return; Minecraft mc = Minecraft.getMinecraft();