Creating a chest with a specific spawn egg inside

I am trying to make a parkour for my server and the prize would be a villager egg but when I use this command to refresh the chest for others it's just an egg that says: "spawn"
/summon FallingSand ~ ~4 ~ {TileID:146,Time:0.9,TileEntityData:{Items:[{id:383,Slot:1,Count:1}]}
How do I make this a villager egg?
Best Answer
Your spawn egg isn't a villager egg if you don't set its damage value. In your case try Damage:120
in addition to the id, count, and slot.
Pictures about "Creating a chest with a specific spawn egg inside"



How do you give a specific spawn egg?
A spawn egg's ID is 383 and can be obtained using the /give command. However, this will only give a player a white egg with white spots, which cannot actually be used, unless a player specifies the data tag.Can you get spawn eggs in chests?
Eggs can now be found in chests in village fletcher houses.How do you get secret spawn eggs in Minecraft?
Mobs can be spawned with spawn eggs in Survival mode, but spawn eggs are not obtainable in Survival without cheats; they can be obtained only using the Creative menu or commands.How to get Hidden Spawn Eggs with 1 command - Minecraft PE/BE 1.16
More answers regarding creating a chest with a specific spawn egg inside
Answer 2
If you press F3 + H over a villager spawn egg it should say "Spawn Villager 383:120" instead of having 383 in the area put 383:120
Answer 3
Here's a command that can give you a Villager spawn egg /give {player} minecraft:spawn_egg 1 0 {EntityTag:{id:"villager"}}
If you are in a older version of minecraft then here's the command /give {player} minecraft:spawn egg 1 120
But to put that in a chest then is this /give {player} chest 1 0 {BlockEntityTag:{Items:[{Slot:0,id:spawn_egg,Count:1,tag:{EntityTag:{id:villager}}}]}}
if you want to summon the chest then is this /setblock ~ ~ ~1 chest 0 replace {Items:[{Slot:0,id:spawn_egg,Count:1,tag:{EntityTag:{id:villager}}}]}.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.