From 220bf15cfbdfb6040497bd592803fc4873eb217d Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Sun, 29 Mar 2020 16:56:52 +0100 Subject: [PATCH] Don't process unless the event type means it will actually draw something --- .../java/electroblob/wizardry/client/gui/GuiSpellDisplay.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/electroblob/wizardry/client/gui/GuiSpellDisplay.java b/src/main/java/electroblob/wizardry/client/gui/GuiSpellDisplay.java index 3b97ab9e..e511c6f1 100644 --- a/src/main/java/electroblob/wizardry/client/gui/GuiSpellDisplay.java +++ b/src/main/java/electroblob/wizardry/client/gui/GuiSpellDisplay.java @@ -97,6 +97,9 @@ public class GuiSpellDisplay { // 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.Post event){ + + if(event.getType() != RenderGameOverlayEvent.ElementType.TEXT + && event.getType() != RenderGameOverlayEvent.ElementType.HOTBAR) return; Minecraft mc = Minecraft.getMinecraft();