Monster spawners with custom data that were created using /give revert to pig spawners after one spawn. For example, activating the command
Minecraft 1.12.2
/give @p minecraft:mob_spawner 1 0 {BlockEntityTag:{SpawnCount:15,SpawnRange:3,MinSpawnDelay:1,MaxSpawnDelay:40,RequiredPlayerRange:1,SpawnData:{id:"minecraft:chest_minecart"}}}
Minecraft 18w22c
/give @p minecraft:mob_spawner{BlockEntityTag:{SpawnCount:15,SpawnRange:3,MinSpawnDelay:1,MaxSpawnDelay:40,RequiredPlayerRange:1,SpawnData:{id:"minecraft:chest_minecart"}}}
WILL give me a monster spawner that spawns a chest minecart, but when that is placed and it spawns one round of entities, the spawner will revert to a pig spawner.
Related issues
duplicates
Comments


@unknown, this is another issue, it's now Enchantments
with string ID, see MC-130580

Confirmed for 18w22c. Ticket needs an update. The command to reproduce is not working anymore. Please update accordingly:
/give @p minecraft:mob_spawner{BlockEntityTag:{SpawnCount:15,SpawnRange:3,MinSpawnDelay:1,MaxSpawnDelay:40,RequiredPlayerRange:1,SpawnData:{id:"minecraft:chest_minecart"}}}

Thanks, done.

Can confirm. Also the case for some mob spawners created with spawn eggs. 🙂
Correct me if I'm missing something, but is this not a duplicate of MC-92282?

Indeed it is a duplicate. The current work-around is to supply SpawnPotentials
explicitly:
/give @p minecraft:mob_spawner{BlockEntityTag:{SpawnCount:15,SpawnRange:3,MinSpawnDelay:1,MaxSpawnDelay:40,RequiredPlayerRange:1,SpawnData:{id:"minecraft:chest_minecart"},SpawnPotentials:[{Entity:{id:"minecraft:chest_minecart"},Weight:1}]}}
Similar effect with spawn eggs. For example,
only gives you a normal skeleton spawn egg in 18w22a.