mojira.dev
MC-297392

Swapping to another item shortly after attacking causes an item properties desync

Explanation:

Attacking with an item then shortly after switching to a different item results in an attack that uses the 1st item’s attack damage/attack speed but the 2nd item’s enchantments/durability. This can be abused to use high damage weapons with enchantments that they should not have access to, such as using Breach 4 with a Netherite Sword. This can also be abused to have infinite durability with any item. Additionally, this desync causes the attack to have 100% cooldown charge, despite having just switched items which should reset the cooldown.

Steps to Reproduce:

  1. Have two items, one with an enchantment and one without.

  2. Attack with the non-enchanted item and quickly switch to the enchanted item using a hotkey.

  3. Note how the attack used the damage and attack speed of the first item, but the enchantment and durability of the second item, and the attack was fully charged despite having just switched items.

Result Expectation:

  • Expected Result: The attack damage/speed/enchantments/durability of only the second item are used for the attack, and the attack is at 0% cooldown charge.

  • Actual Result: The attack damage/speed of the first item and the enchantments/durability of the second item are used for the attack, and the attack is at 100% cooldown charge.

Attached videos:

  1. In the first attached video, I attack with a netherite sword but desync to a fire aspect wooden hoe. This causes my attack to do the full 12 damage of the netherite sword critical hit, while also applying the fire aspect from the wooden hoe. It also avoids any durability loss on the netherite sword, and uses its high attack speed for the recovery.

  2. In the second attached video, I attack with a netherite sword but desync to a breach 4 mace. This causes my attack to do the full 12 damage of the netherite sword critical hit, while also applying the breach 4 from the mace. Afterwards, I demonstrate how attacking with only the breach 4 mace results in lower damage (7.9 damage) than using the desync exploit (10.8 damage) to the armored skeleton.

  3. In the third attached video, I attack with a 1 durability netherite axe but desync to a bare fist. This causes my attack to do the full 10 damage of the netherite axe (one-shotting the pig), while using the durability of the bare fist. This can be repeated to infinitely use any item and completely avoid durability loss.

Linked issues

Attachments

Comments 0

No comments.

SeaOfPixels

(Unassigned)

Confirmed

Platform

Important

Combat, Items

1.21.5, 25w18a, 25w19a

Retrieved