mojira.dev
MC-118740

Performing any right-click action silently resets the attack cooldown

The bug

When a player "uses" an item (or performs any other right-click action), the player is put into attack cooldown, as though the player had just attacked. On top of being unintended behavior, this cooldown is not visually indicated: the item in the main hand does not move down, and the attack indicator does not appear. Should the player attack right after a "use" action, the weapon will look like it's doing a normal attack, but will suffer all the penalties of being on cooldown, e.g. reduced damage, no sweeping hit, no crit.

How to reproduce

Put a sword in the main hand, a fishing rod in the offhand, and a mob in front of you. Use the rod, then immediately swing. There's no sweeping attack, and the mob will take less damage.

This bug interferes with common combat scenarios such as: 
-Pulling a shield up to block just before attacking
-Placing blocks/water/lava from offhand then attacking
-Throwing a projectile from offhand then attacking
-Launching self with a wind charge before attacking

Linked issues

Attachments

Comments 19

Brenden Smith

How does this duplicate switching weapons? This has nothing to do with switching what weapon a player is holding - using an item resets the cooldown. If you hold something in the offhand and right-click to use it, the main hand weapon has its cooldown activated.

Paint

Relates to MC-116510.

Brenden Smith

Oh and still affects 1.12.1.

pokechu22

Added, but since you're the reporter of this bug you can update the affected versions directly.

Iosiv Visokogorskiy

Affects 1.16 pre release 2

9 more comments
Avoma

Can confirm in 1.19.

TomatoClownfish

Can confirm in 1.19.3.

Wolfie Waffle

Can confirm in 1.20.2.

sandro38

This bug also affects throwing wind charges. As of 24w18a, it's impossible to crit with a mace after using a wind charge, and if MC-270158 is fixed, this bug will prevent players from using wind burst after using a wind charge

Klyon (yo)

Still works in version 1.21.5

Sometimes I cannot protect myself from a zombie using a shield. :(

Brenden Smith

(Unassigned)

Confirmed

Platform

Low

Combat

Minecraft 1.12, Minecraft 1.12.1, Minecraft 18w11a, Minecraft 18w14b, Minecraft 18w20a, ..., 1.20.2, 1.20.6, 24w18a, 24w19a, 24w19b

Retrieved