2

I have been having trouble adapting my commands to summon mobs with enchanted gear in 1.20.5 since the introduction of components. This is the best I have come up with so far.

/summon pillager ~ ~ ~ {Tags:[Pill1_B],Team:Blue,PersistenceRequired:1,HandItems:[{Count:1,id:golden_sword,components:{"minecraft:enchantments":["minecraft:sweeping_edge"]}}],Attributes:[{Name:"generic.follow_range", Base:100.0}]}

This command is green like it should work but doesn't. Also if I try and add the level here edge":3]}}]... which some people suggested it stops working. Can you please provide me with an example of a fully working summon command not just parts I need to include as I have trouble piecing it together. Also if you could please show an example of a command for a mob with enchanted gear and an enchanted weapon that would be great.

1
  • For 1.20.5 and later, Minecraft uses Components, not Tags.
    – Tiimzee
    Commented May 14 at 19:41

1 Answer 1

4
/summon pillager ~ ~ ~ {Tags:[Pill1_B],Team:Blue,PersistenceRequired:1,HandItems:[{Count:1,id:golden_sword,components:{"minecraft:enchantments":{"minecraft:sweeping_edge":3}}}],Attributes:[{Name:"generic.follow_range", Base:100.0}]}

summons a pillager with an enchanted sword for me. I haven't tested any of the other custom data of it, though.

I think the problem when you tried it is that you left an extra set of square brackets around the enchantments value.

See How do I give players already enchanted Tools/Armour/Weapons for the general canonical question on enchantment syntax.

0

You must log in to answer this question.

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