Mojira Archive
MC-279412

Switching between items in the same tick as an attack can cause one item's attribute modifiers to be applied on another

What I expected to happen was...:
When hotkey-ing to an item in the same tick you attack, the attributes modifiers of the new item are applied and the new item (if applicable) would lose durability.

What actually happened was...:
When hotkey-ing to an item in the same tick you attack, the attribute modifiers of the old item (the one you switched from) are applied while the new item (if applicable) would lose durability and have its enchantments apply

Steps to Reproduce:
1. Go to survival
2. Take any item that can lose durability
3. Attack any entity, and, at the exact moment you attack, switch to an empty hotbar slot by using a hotkey

Attached are videos of me abusing this bug to do several things:
Attack with a diamond sword without losing durability
Use a netherite axe's attack damage attribute with a mace's breach and fire aspect enchantments to bypass armor while dealing the damage you'd expect from a netherite axe

I've also attached a .nbt file of the structure I used to test for anyone who wants to test it using my setup

Duplicate

MyShampooIsDrunk

2025-01-12, 04:27 PM

2025-01-12, 04:59 PM

2025-01-12, 04:54 PM

0

1

Unconfirmed

(Unassigned)

1.21.4

-