From f7da8b4109d23306709e12371d21d028f6800812 Mon Sep 17 00:00:00 2001 From: Hubry Date: Sun, 19 Jan 2020 18:09:00 +0100 Subject: [PATCH] Don't draw tiara/dodge hud if hud is hidden by creative Didn't check creative when changing this earlier --- .../client/core/handler/HUDHandler.java | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/vazkii/botania/client/core/handler/HUDHandler.java b/src/main/java/vazkii/botania/client/core/handler/HUDHandler.java index e57d033ae..21fbb0301 100644 --- a/src/main/java/vazkii/botania/client/core/handler/HUDHandler.java +++ b/src/main/java/vazkii/botania/client/core/handler/HUDHandler.java @@ -88,19 +88,21 @@ public final class HUDHandler { if(event.getType() == ElementType.ALL) { profiler.startSection("botania-hud"); - - ItemStack tiara = EquipmentHandler.findOrEmpty(ModItems.flightTiara, mc.player); - if(!tiara.isEmpty()) { - profiler.startSection("flugelTiara"); - ItemFlightTiara.renderHUD(mc.player, tiara); - profiler.endSection(); - } - ItemStack dodgeRing = EquipmentHandler.findOrEmpty(ModItems.dodgeRing, mc.player); - if(!dodgeRing.isEmpty()) { - profiler.startSection("dodgeRing"); - ItemDodgeRing.renderHUD(mc.player, dodgeRing, event.getPartialTicks()); - profiler.endSection(); + if (Minecraft.getInstance().playerController.shouldDrawHUD()) { + ItemStack tiara = EquipmentHandler.findOrEmpty(ModItems.flightTiara, mc.player); + if(!tiara.isEmpty()) { + profiler.startSection("flugelTiara"); + ItemFlightTiara.renderHUD(mc.player, tiara); + profiler.endSection(); + } + + ItemStack dodgeRing = EquipmentHandler.findOrEmpty(ModItems.dodgeRing, mc.player); + if(!dodgeRing.isEmpty()) { + profiler.startSection("dodgeRing"); + ItemDodgeRing.renderHUD(mc.player, dodgeRing, event.getPartialTicks()); + profiler.endSection(); + } } RayTraceResult pos = mc.objectMouseOver;