The Bug:
Switching items at the same time as attacking carries over the attributes and enchantments of the previously held item.
Among the PvP community, this is often referred to as “attribute swapping” or “breach swapping”. This bug allows you to perform attacks that shouldn’t normally be possible, therefore giving the player a severe advantage, which is unfair for other players. This works in all game modes, but can more easily be seen in survival due to the durability loss of items. This also makes it possible to do mace smash attacks with the base damage of other weapons.
Steps to Reproduce:
Give yourself some plain wooden axes along with some wooden swords enchanted with fire aspect by using the command provided below.
/give @s minecraft:wooden_axe 7/give @s minecraft:wooden_sword[minecraft:enchantments={"minecraft:fire_aspect":1}] 7Summon multiple turtles on the ground and switch into survival mode.
Attack a turtle while holding the wooden axe, and as you do this, quickly switch to the enchanted wooden sword.
If the turtle wasn’t set on fire, repeat the above steps.
Observe how the attributes (damage and attack speed) of the wooden axe were used, but the enchantments and durability of the wooden sword were also used.
Observed Behavior:
The attributes of the wooden axe were used, and the enchantments and durability of the wooden sword were also used, and the attack itself was at 100% cooldown charge despite just recently switching items.
Expected Behavior:
The attributes and enchantments of the wooden sword would be used in the attack, and the attack itself should be at 0% charge due to just recently switching items.
Linked issues
is duplicated by 10
relates to 2
Attachments
Comments 52
Is this still a concern in the latest Minecraft version 14w30c? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
This is still a problem in 14w31a. I've updated the affected version(s) and added more screenshots to confirm.
Why would they try to fix it when:
- The PVP community has this a a feauture and they will go to mojang so it gets reverted
I don’t think this is a good idea to fix, it is a bug that has been in the game for a long(?) time and people have trained to be good at using this, fixing this would be probably not be very good for the PvP community
Still in 26.2 snapshot 1. Maybe it’s not a good idea to refresh the attribute and cooldown instantly. Instead, maybe a combat test feature is better: Swapping items refreshes the right attributes, but doesn’t reset attack cooldown (means real time but not percentage). So players won't feel that their swapping attack is too weak.
Swapping can combine attribute of item 1 and components of item 2 is absolutely broken. Datapacks or mods get the wrong result when detecting the used item. Also, marco can 100% successful and it’s not easy to detect on server because it’s same to “high-skill playing“ manually.
Even the third party server software, Paper, has made the fix plan for this bug by resting attack cooldown and refreshing attribute. However it’s not complete. The video shows that double swapping still has the spear reach and attribute (Some texture pack won’t affect the result). I guess it’s because the communication problems between server and client.
Confirmed.