From 2e5a9fce3ee0a46e0a7199a49e33e7ad5e1b5112 Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Mon, 2 Sep 2019 15:15:36 +0100 Subject: [PATCH] Don't call canCast() from WizardryUtilities#isCasting(), fixes #196 --- .../java/electroblob/wizardry/util/WizardryUtilities.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/electroblob/wizardry/util/WizardryUtilities.java b/src/main/java/electroblob/wizardry/util/WizardryUtilities.java index d6772355..cbb0ee05 100644 --- a/src/main/java/electroblob/wizardry/util/WizardryUtilities.java +++ b/src/main/java/electroblob/wizardry/util/WizardryUtilities.java @@ -870,9 +870,10 @@ public final class WizardryUtilities { ItemStack stack = caster.getHeldItem(caster.getActiveHand()); - if(stack.getItem() instanceof ISpellCastingItem && ((ISpellCastingItem)stack.getItem()).getCurrentSpell(stack) == spell - && ((ISpellCastingItem)stack.getItem()).canCast(stack, spell, (EntityPlayer)caster, - EnumHand.MAIN_HAND, 0, new SpellModifiers())){ + if(stack.getItem() instanceof ISpellCastingItem && ((ISpellCastingItem)stack.getItem()).getCurrentSpell(stack) == spell){ + // Don't do this, it interferes with stuff! We effectively already tested this with caster.isHandActive() anyway +// && ((ISpellCastingItem)stack.getItem()).canCast(stack, spell, (EntityPlayer)caster, +// EnumHand.MAIN_HAND, 0, new SpellModifiers())){ return true; } }