Code (cpp):
setblock ~ ~1 ~ mob_spawner 0 replace {MaxNearbyEntities:1s,RequiredPlayerRange:16s,SpawnCount:1s,SpawnData:{EntityId:"Item",Item:{id:"minecraft:stone",Count:1b,Damage:0s},Fire:300s},MaxSpawnDelay:20s,Delay:0s,EntityId:"Item",id:"MobSpawner",SpawnRange:1s,MinSpawnDelay:2s,SpawnPotentials:[0:{Type:"Item",Properties:{Health:5s,EntityId:"Item",Item:{id:"minecraft:spawn_egg",Count:1b,Damage:62s}},Weight:1},1:{Type:"Item",Properties:{Health:5s,EntityId:"Item",Item:{id:"minecraft:spawn_egg",Count:1b,Damage:95s}},Weight:1},2:{Type:"Item",Properties:{EntityId:"Item",Item:{id:"minecraft:spawn_egg",Count:1b,Damage:92s}},Weight:1},3:{Type:"Item",Properties:{EntityId:"Item",Item:{id:"minecraft:spawn_egg",Count:1b,Damage:68s}},Weight:1},4:{Type:"Item",Properties:{EntityId:"Item",Item:{id:"minecraft:spawn_egg",Count:1b,Damage:100s}},Weight:1}]}
Il y a juste le premier objet qui n'est pas aléatoire (c'est pour cela que je le fais d'auto-détruire), mais ensuite tout les objets sont aléatoires. Et on peut choisir d'attribuer un poid (weight) à chaque objet pour augmenter ses chances d'apparaître.