M HYPE SPLASH
// news

How do I make a Villager Trade a Spawn Egg [duplicate]

By Michael Henderson

I am trying to make a Custom Trade on a villager. I need to make him buy 8 gold nuggets and sell a Cow Spawn Egg. basically you pay 8 nuggets for a Cow Spawner. The ID of the Cow Spawn Egg is 92 but I don't know where to put it in the command

/summon Villager ~ ~2 ~ {Invulnerable:1,CustomName:Spawner_Vendor,Profession:2,Career:1,Offers:{Recipes:[{buy:{id:gold_nugget,Count:8},sell:{id:spawn_egg,Count:1}}]}}
2

3 Answers

Use the Damage: value. This is the command you should run in a command block:

/summon Villager ~ ~2 ~ {Invulnerable:1,CustomName:Spawner_Vendor,Profession:2,Career:1,Offers:{Recipes:[{buy:{id:gold_nugget,Count:8},sell:{id:spawn_egg,Count:1,Damage:92}}]}}

How about MCStacker 2? MCStacker 2 is a no-download and free command generator. Here is a 1.12 example I got from it:/summon villager ~ ~ ~ {CustomName:"Spawn Egg Sal",Profession:0,Career:3,CareerLevel:100,Willing:1b,Offers:{Recipes:[{buy:{id:"minecraft:bone",Count:10b},buyB:{id:"minecraft:rotten_flesh",Count:10b},sell:{id:"minecraft:spawn_egg",Count:1b,tag:{EntityTag:{id:"minecraft:cow"}}}}]}}

1.13:/summon villager ~ ~ ~ {Profession:0,Career:3,CareerLevel:100,Willing:1b,CustomName:"{\"text\":\"Spawn Egg Sal\",\"color\":\"aqua\",\"bold\":true}",Offers:{Recipes:[{buy:{id:"minecraft:bone",Count:10b},buyB:{id:"minecraft:rotten_flesh",Count:10b},sell:{id:"minecraft:cow_spawn_egg",Count:1b}}]}}

MCStacker 2

Here's the right command /summon villager ~ ~1 ~ {PersistenceRequired:1,CustomName:Vendor,Offers:{Recipes:[{buy:{id:gold_nugget,Count:8},sell:{id:spawn_egg,Count:1,tag:{EntityTag:{id:cow}}},maxUses:9999999}]}}