The bug
You can put stacked items that normally aren't stackable into the anvil, expected it to just put one item into the anvil. (Video by @unknown)
How to reproduce
Give yourself 64 swords, and one enchanted sword.
/summon minecraft:item ~ ~ ~ {Item:{id:"diamond_sword",Count:64b}} /give @p diamond_sword{Enchantments:[{id:sharpness,lvl:3},{id:fire_aspect,lvl:1},{id:looting,lvl:3},{id:sweeping,lvl:3},{id:unbreaking,lvl:1}]}
Put the illegal stacked item in the anvil.
→ ❌ Puts the 64 swords in the anvil, should put only one as its not stackablePut the enchanted sword in the second anvil slot.
→ ❌ It valids the process; you can apply the enchantments to the 64 swords.
Linked issues
is duplicated by 1
Attachments
Comments 20
You can also get a stack of swords by using
/give NAME 276 64
so I guess this bug should be reopened. Also, changing the anvil code to prevent stacked repairs or to calculate the correct cost should be quite trivial.
However, its not a bad idea to rename a stack of blocks cheaply; forcing users to individually rename dirt for example in an adventure map would be tedious for map makers, I have no idea why you would want a stack of swords unless they were all the same, again this is only relevant for map makers who would be the only people to use this.
The issue here is not to put stacked items on the anvil per se, it's using normally *un*stackable items as a stack on the anvil.
This is because tools and armour cannot be stacked. To achieve this, you would have to either use a mod, or edit the game files.