-
Bug
-
Resolution: Duplicate
-
None
-
1.21.3, 24w46a
-
None
-
Unconfirmed
-
(Unassigned)
When you attack an entity or a player with an item right as you swap to a different item that is enchanted, the damage of the first item will be preserved, but the enchantments of the second item will be applied.
Steps to Reproduce:
Spawn a fresh husk for each attack step, so that the base health is always 20:
/summon husk ~ ~ ~ {NoAI:1b}
- In a repeating command block, display the husk's health for ease of viewing:
execute as @n[type=minecraft:husk] run title @a actionbar {"entity":"@s","nbt":"Health"}
- Attack it with a wooden sword, and immediately swap to a netherite sword during the attack.
→ Roughly 4 damage is done
wood-netherite.mp4 - Attack it with a wooden sword, and immediately swap to a netherite sword with
sharpness V during the attack.
→ Roughly 7 damage is done
wood-enchanted-netherite.mp4
Expected Result:
Swapping to an enchanted item from a regular item would not apply enchantment modifiers to the first item. If damage of the first item is preserved, so should enchantments.
Observed Behavior:
When the player attacks with a wooden sword and swaps to a netherite sword, the damage of the wooden sword is preserved as expected. When the second attack is done though (swapping to an enchanted netherite sword) the damage of the wooden sword is kept, but the enchantment of the netherite sword (sharpness V) is applied to the wooden sword.
- duplicates
-
MC-28289 Switching items at the same time as attacking ignores the item attributes
- Reopened