I'm trying to get a villager to sell AND buy something VERY specific. I'm trying to get a villager to sell and buy items that have names and enchants on them but stitching together commands is very difficult.
The command is for "custom" items on a server I own and here it is
/summon villager 36.998 62.5 41.985 {VillagerData:{profession:armorer,level:4,type:swamp},Invulnerable:1,PersistenceRequired:1,Silent:1,NoAI:1,CustomName:"\"Goblin Merchant\"",Offers:{Recipes:[{buy:{id:glass,Count:1},buyB:{id:blaze_powder,Count:4},sell:{id:glass,Count:1,tag:{display:{Name:"\"Empty Gem\"",Lore:["\"Can be filled with magical power\""]}}},maxUses:9999999},{buy:{id:rabbit_foot,Count:1},buyB:{id:lily_of_the_valley,Count:1},sell:{id:green_dye,Count:1,tag:{display:{Name:"\"Four-Leaved Clover\"",Lore:["\"Lucky!\""]}}},maxUses:9999999},{buy:{id:glass,Count:1},buyB:{id:slime_ball,Count:1},sell:{id:lime_dye,Count:1,tag:{display:{Name:"\"Lucky Gem\"",Lore:["\"Can be used in custom crafting\""]}}},maxUses:9999999},{buy:{id:golden_carrot,Count:1},buyB:{id:ender_eye,Count:1},sell:{id:fermented_spider_eye,Count:1,tag:{display:{Name:"\"Ocular Fruit\"",Lore:["\"I think it's staring at me...\""]}}},maxUses:9999999},{buy:{id:glass,Count:1},buyB:{id:fermented_spider_eye,Count:1},sell:{id:purple_dye,Count:1,tag:{display:{Name:"\"Ocular Gem\"",Lore:["\"Looking through it hurts your eyes\""]}}},maxUses:9999999},{buy:{id:redstone_block,Count:10},buyB:{id:golden_pickaxe,Count:1},sell:{id:glowstone_dust,Count:1,tag:{display:{Name:"\"Abrasive Powder\"",Lore:["\"Holding it in your hands is painful\""]}}},maxUses:9999999},{buy:{id:glass,Count:1},buyB:{id:glowstone_dust,Count:1},sell:{id:yellow_dye,Count:1,tag:{display:{Name:"\"Abrasive Gem\"",Lore:["\"Its extremely heavy\""]}}},maxUses:9999999}]}}
Things like the Empty Gem, Ocular Gem, ect. I want to have enchants on.
Also I uploaded this thread before finishing it by accident, sorry
this site may be able to help i use it all the time when i work with custom mobs https://mcstacker.net/ go to summon and choose a villager and on the trades it has lots of options for what items there can be on it from modifiers to enchantments,names,etc...
{id:glass,Count:1,tag:{display:{Name:"\"Empty Gem\"",Lore:["\"Can be filled with magical power\""]},Enchantments:[{id:"minecraft:sharpness",lvl:1},{id:"minecraft:protection",lvl:5]}}
I added two enchantments on it just to show a bit how it works.
If you want only the glowing effect :
As long as the item has something in Enchantments tag (still need to be a list though), it gets the glowing effect.
For that purpose, you can simply use the tag Enchantments:[{nope:1}] ; it would display the glowing effect as well
Rollback Post to RevisionRollBack
I got into chiptune music composition.
You can listen to them on my Youtube channel : https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
I'm trying to get a villager to sell AND buy something VERY specific. I'm trying to get a villager to sell and buy items that have names and enchants on them but stitching together commands is very difficult.
The command is for "custom" items on a server I own and here it is
/summon villager 36.998 62.5 41.985 {VillagerData:{profession:armorer,level:4,type:swamp},Invulnerable:1,PersistenceRequired:1,Silent:1,NoAI:1,CustomName:"\"Goblin Merchant\"",Offers:{Recipes:[{buy:{id:glass,Count:1},buyB:{id:blaze_powder,Count:4},sell:{id:glass,Count:1,tag:{display:{Name:"\"Empty Gem\"",Lore:["\"Can be filled with magical power\""]}}},maxUses:9999999},{buy:{id:rabbit_foot,Count:1},buyB:{id:lily_of_the_valley,Count:1},sell:{id:green_dye,Count:1,tag:{display:{Name:"\"Four-Leaved Clover\"",Lore:["\"Lucky!\""]}}},maxUses:9999999},{buy:{id:glass,Count:1},buyB:{id:slime_ball,Count:1},sell:{id:lime_dye,Count:1,tag:{display:{Name:"\"Lucky Gem\"",Lore:["\"Can be used in custom crafting\""]}}},maxUses:9999999},{buy:{id:golden_carrot,Count:1},buyB:{id:ender_eye,Count:1},sell:{id:fermented_spider_eye,Count:1,tag:{display:{Name:"\"Ocular Fruit\"",Lore:["\"I think it's staring at me...\""]}}},maxUses:9999999},{buy:{id:glass,Count:1},buyB:{id:fermented_spider_eye,Count:1},sell:{id:purple_dye,Count:1,tag:{display:{Name:"\"Ocular Gem\"",Lore:["\"Looking through it hurts your eyes\""]}}},maxUses:9999999},{buy:{id:redstone_block,Count:10},buyB:{id:golden_pickaxe,Count:1},sell:{id:glowstone_dust,Count:1,tag:{display:{Name:"\"Abrasive Powder\"",Lore:["\"Holding it in your hands is painful\""]}}},maxUses:9999999},{buy:{id:glass,Count:1},buyB:{id:glowstone_dust,Count:1},sell:{id:yellow_dye,Count:1,tag:{display:{Name:"\"Abrasive Gem\"",Lore:["\"Its extremely heavy\""]}}},maxUses:9999999}]}}
Things like the Empty Gem, Ocular Gem, ect. I want to have enchants on.
Also I uploaded this thread before finishing it by accident, sorrythis site may be able to help i use it all the time when i work with custom mobs https://mcstacker.net/ go to summon and choose a villager and on the trades it has lots of options for what items there can be on it from modifiers to enchantments,names,etc...
Here would be the data for the empty gem :
{id:glass,Count:1,tag:{display:{Name:"\"Empty Gem\"",Lore:["\"Can be filled with magical power\""]},Enchantments:[{id:"minecraft:sharpness",lvl:1},{id:"minecraft:protection",lvl:5]}}
I added two enchantments on it just to show a bit how it works.
If you want only the glowing effect :
As long as the item has something in Enchantments tag (still need to be a list though), it gets the glowing effect.
For that purpose, you can simply use the tag Enchantments:[{nope:1}] ; it would display the glowing effect as well
I got into chiptune music composition.
You can listen to them on my Youtube channel :
https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).