I need help with changing a summon command to work in 1.20.5. The command appears to be correct, however, when I summon the mob it has armor/weapons but the enchantments don't work.

The command is:

/summon zombified_piglin ~1 ~ ~-2 {CustomName:"\"Bank Guard \"",Team:Blue, Tags:[BAUnit1_B],PersistenceRequired:1,HandItems:[{Count:1,id:golden_sword,tag:{Enchantments:[{id:sweeping_edge,lvl:4},{id:unbreaking,lvl:3}]}},{}],ArmorItems:[{Count:1,id:golden_boots,tag:{Enchantments:[{id:protection,lvl:1}]}},{Count:1,id:golden_leggings,tag:{Enchantments:[{id:protection,lvl:1}]}},{Count:1,id:golden_chestplate,tag:{Enchantments:[{id:protection,lvl:1}]}},{Count:1,id:golden_helmet,tag:{Enchantments:[{id:protection,lvl:1}]}}],IsImmuneToZombification:1b}

Also can you please explain how it works so that I can apply to all my other summon commands I use in my map I am creating? I don't need an example of necessarily every attribute in this command just anything that may differ in how it is typed.

  • Hey thanks for the reply unfortunately it did not work for me. I tried both of those options in front of a /summon zombie ~ ~ ~ command and it didn't work. command used: /summon zombie ~ ~ ~ {Count:1,id:golden_sword,components:{"minecraft:enchantments":["minecraft:sweeping_edge":4,"minecraft:unbreaking":3]}}
    – Frosty
    Commented May 3 at 11:36

1 Answer 1


In 1.20.5, NBT tags (the tag element) in items have been replaced with components. You will need to convert your command.
For example, the sword your entity carries:


Would become:




You can read more about it on the Minecraft Wiki.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .