Don't process unless the event type means it will actually draw something

This commit is contained in:
Electroblob77
2020-03-29 16:56:52 +01:00
parent 885e58c85c
commit 220bf15cfb
@@ -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();