1
Enchanted items with villagers?
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}]}}
/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}]}}
1
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
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}]}}}]}}
