Don't draw tiara/dodge hud if hud is hidden by creative

Didn't check creative when changing this earlier
This commit is contained in:
Hubry committed 2020-01-19 18:09:34 +01:00
1 parent 09f4864738
commit f7da8b4109
1 file changed
+14 -12
@@ -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;