mojira.dev
MC-304830

Using an item before attacking with an item with the minimum_attack_charge component and trying to attack again plays the attack animation

When you try to hit someone with an item with the minimum_attack_charge item component after you used an item, even you are near the mob/player, you can’t hit it, if you wait some seconds, you can hit the mob/player again, but the punch animation is anyway played, like if after you used the item, the attack speed of the item as been reset.

Expected result :

After you used an item, when you hit someone with an item with the minimum_attack_charge component, it takes damages.

Actual result :

After you used an item, when you try to hit someone with an item with the minimum_attack_charge component, you can’t it for some seconds, anyway there is the punch animation.

Steps to reproduce :

  1. Execute the command /give @s mace[minimum_attack_charge=1] and put the given item in your mainhand

  2. Give you an item with utility in your offhand (Fishing Rod, Wind Charge, Ender Pearl, Snowball…)

  3. Use the item of your offhand with right click and then try to hit a mob (for example a Mannequin)

Environment

Windows 11
Singleplayer

Attachments

Comments 3

Not being able to attack is WAI, as using offhand items resets the mainhand cooldown. The arm swinging is a bug though.

Oh, ok, I thought it was normal that the swing animation was played but not normal that we can’t hit the opponent, but why the offhand reset the attack charge ?

Loupieur

(Unassigned)

1529484

Confirmed

Expansion A

Low

Items

1.21.11 Release Candidate 2, 1.21.11

Retrieved