From 9dc186abf40286674a8db690537dbafb731e6a78 Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Wed, 21 Oct 2020 22:41:26 +0100 Subject: [PATCH] Fix the charge meter showing when holding a wand in the offhand but using the main hand item --- .../java/electroblob/wizardry/client/gui/GuiSpellDisplay.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/electroblob/wizardry/client/gui/GuiSpellDisplay.java b/src/main/java/electroblob/wizardry/client/gui/GuiSpellDisplay.java index 04cdc513..96a0c326 100644 --- a/src/main/java/electroblob/wizardry/client/gui/GuiSpellDisplay.java +++ b/src/main/java/electroblob/wizardry/client/gui/GuiSpellDisplay.java @@ -154,6 +154,7 @@ public class GuiSpellDisplay { if(!Wizardry.settings.showChargeMeter) return; if(Minecraft.getMinecraft().gameSettings.showDebugInfo) return; // Don't show charge meter in the debug screen if(Minecraft.getMinecraft().gameSettings.thirdPersonView != 0) return; // Don't show in third person + if(wand != player.getActiveItemStack()) return; // Don't show when using the other held item if(!(wand.getItem() instanceof ISpellCastingItem)) throw new IllegalArgumentException("The given stack must contain an ISpellCastingItem!");