The problem i have is the enchantment i want is from a mod and when i change the enchantment id in the command it always ends up as a protection book. I am guessing that is because of protection being id:0. Anyway i ended up with this command:
This isn't possible using vanilla commands. The mod would have to have made it so that the modded item would be on the list for items villagers can trade.
and it's one of the modded enchants. Hope this helps, I've also seen that it's probably randomized for RLCraft, so unsure if they'll match up in different worlds!
Basically instead of inputting the name you would for enchanting an item, try inputting a bunch of random numbers, or list them all out for that particular world. I've also determined that the id:# will not repeat for prot 1, prot 2, etc, as that's what the lvl is for. Just keep it at 1 until you know which enchantment it is. I have tested with higher level enchants, and they will go over, like protection 10, mending 6, etc, but I wouldn't risk trying it with mods.
Hi, i am trying to summon a villager with an enchanted book. I got it to spawn a villager with any enchant i want like this
/summon villager ~ ~ ~ {Profession:1,CareerLevel:1,Offers:{Recipes:[{sell:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{id:protection,lvl:1}]}}}]}}
The problem i have is the enchantment i want is from a mod and when i change the enchantment id in the command it always ends up as a protection book. I am guessing that is because of protection being id:0. Anyway i ended up with this command:
/summon villager ~ ~ ~ {Profession:1,CareerLevel:1,Offers:{Recipes:[{sell:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{id:"somanyenchantments:strengthenedvitality",lvl:3}]}}}]}}
If anyone could help me scope out the problem it would be greatly appreciated.
This isn't possible using vanilla commands. The mod would have to have made it so that the modded item would be on the list for items villagers can trade.
I've tested with the mod RLCraft, and this is what I've found. You can enter a random number next to ID, so for example,
/summon villager ~ ~ ~ {Profession:1,CareerLevel:1,Offers:{Recipes:[{sell:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{id:48,lvl:1}]}}}]}}
and it's one of the modded enchants. Hope this helps, I've also seen that it's probably randomized for RLCraft, so unsure if they'll match up in different worlds!
Basically instead of inputting the name you would for enchanting an item, try inputting a bunch of random numbers, or list them all out for that particular world. I've also determined that the id:# will not repeat for prot 1, prot 2, etc, as that's what the lvl is for. Just keep it at 1 until you know which enchantment it is. I have tested with higher level enchants, and they will go over, like protection 10, mending 6, etc, but I wouldn't risk trying it with mods.