1

Enchanted items with villagers?

IntrusiveDev 5/1/20 9:07 pm
191
5/1/2020 11:52 pm
Im trying to make a villager give a sharpness sword, but it isnt working?

/summon villager ~ ~1 ~ {VillagerData:{profession:cleric,level:5,type:plains},Invulnerable:1,Offers:{Recipes:[{buy:{id:emerald,Count:10},sell:{id:diamond_sword,Enchantments:[{id:sharpness,level:5}],Count:1},maxUses:999}]}}
Posted by
IntrusiveDev
Level 29 : Expert System
9

  Have something to say?

JoinSign in

1

HoboMaggot
05/01/2020 11:52 pm
Level 55 : Grandmaster Blob
You need to quote the minecraft namespace and item id, like "minecraft:emerald". You also need to add tag:{Enchantments:[{ after the diamond sword id.
The finished command should be this
/summon minecraft:villager ~ ~ ~ {Invulnerable:1b,VillagerData:{profession:"minecraft:cleric",type:"minecraft:plains"},Offers:{Recipes:[{buy:{id:"minecraft:emerald",Count:10b},sell:{id:"minecraft:diamond_sword",Count:1b,tag:{Enchantments:[{id:"minecraft:sharpness",lvl:5s}]}}}]}}
1

Welcome