I made this thread a few minutes ago but when I viewed my threads, nothing popped up. Was my thread deleted? If so, a message would be nice to know what I did wrong (I did say I was new).
Anyway, I'm trying to summon a Villager with custom trades. I already have a few of them set-up in my server; however, I can't seem to figure out how to get them to sell Enchanted Books with Stored Enchantments.
This is the current command I have to summon a Villager that sells Enchanted Books:
The Villager sells an Enchanted Book for two Iron Ingots. I've been trying to figure out how to store an enchantment in the book!
I've only come across one useful thread through Googling that shows the command for giving a player an Enchanted Book with a Stored Enchatment; however, when I try to apply it to the Villagers offer command it doesn't work!
Any help or an example command of what I want would be greatly appreciated! Or at least let me know if it's not possible, I'm going crazy over here! xD
p.s.
I'm very well aware of xp shops; however, I do not want them because players can easily harvest xp, I use Villagers because I can set specific items and quantities to exchange. Also, they look funny.
A villager i dragged from a village far away died and so I wanted it to also sell emeralds for paper as it's first transaction. The first one works correctly but the second only gives an enchanted book with no enchantment.
I made this thread a few minutes ago but when I viewed my threads, nothing popped up. Was my thread deleted? If so, a message would be nice to know what I did wrong (I did say I was new).
Anyway, I'm trying to summon a Villager with custom trades. I already have a few of them set-up in my server; however, I can't seem to figure out how to get them to sell Enchanted Books with Stored Enchantments.
This is the current command I have to summon a Villager that sells Enchanted Books:
/summon Villager -357 224 -170 {Profession:0,Offers:{Recipes:[{maxUses:2147483647,uses:0,buy:{id:iron_ingot,Count:2},sell:{id:enchanted_book,Count:1}}]}}
The Villager sells an Enchanted Book for two Iron Ingots. I've been trying to figure out how to store an enchantment in the book!
I've only come across one useful thread through Googling that shows the command for giving a player an Enchanted Book with a Stored Enchatment; however, when I try to apply it to the Villagers offer command it doesn't work!
Any help or an example command of what I want would be greatly appreciated! Or at least let me know if it's not possible, I'm going crazy over here! xD
p.s.
I'm very well aware of xp shops; however, I do not want them because players can easily harvest xp, I use Villagers because I can set specific items and quantities to exchange. Also, they look funny.
Hope this helps.
{id:enchanted_book,tag:{StoredEnchantments:[{id:16,lvl:5},{id:21,lvl:3},{id:35,lvl:3}]},Count:1}
Thanks, man!
Such useful information!
Thank you even years later!
Thank you yet again!
yeah, thx
In 1.13 the villager offers me an enchanted book, but without any enchants? (yes i did fill in a number (26 (mending))) please help me out ^^.
I have the exact same problem. All I can ever get is the enchanted book with no enchantments. Here is the exact command:
/summon villager ~ ~1 ~ {PersistenceRequired:1,Offers:{Recipes:[{buy:{id:paper,Count:34},sell:{id:emerald,Count:1},maxUses:9999999},{buy:{id:book,Count:1},buyB:{id:emerald,Count:20},sell:{id:enchanted_book,tag:{StoredEnchantments:[{id:26,lvl:1}]},Count:1},maxUses:9999999}]},Profession:1,Career:1,CareerLevel:5}
A villager i dragged from a village far away died and so I wanted it to also sell emeralds for paper as it's first transaction. The first one works correctly but the second only gives an enchanted book with no enchantment.
The key is to use the correct Enchantment ID. Using enchant names like "minecraft:mending" worked for me.