feat: Wand cooldown only decrements if the player holds the wand

This commit is contained in:
ZettaSword
2022-08-04 23:17:31 +03:00
committed by GitHub
parent 5b48dffa77
commit 7888b92129
@@ -227,8 +227,8 @@ public class ItemWand extends Item implements IWorkbenchItem, ISpellCastingItem,
@Override
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isHeld){
WandHelper.decrementCooldowns(stack);
if(isHeld) WandHelper.decrementCooldowns(stack);
// Decrements wand damage (increases mana) every 1.5 seconds if it has a condenser upgrade
if(!world.isRemote && !this.isManaFull(stack) && world.getTotalWorldTime() % Constants.CONDENSER_TICK_INTERVAL == 0){