mojira.dev
MC-130509

Custom spawners resets to default (pig) state after spawning entity once

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

Comments

migrated

Similar effect with spawn eggs. For example, 

/give d minecraft:skeleton_spawn_egg{EntityTag:{CanPickUpLoot:1b,HandItems:[{id:bow,Damage:0,Count:1,tag:{ench:[{id:49,lvl:2},\{id:50,lvl:1}]}}],ArmorItems:[{},{},{},\\{id:carved_pumpkin,Count:1}],PersistenceRequired:1b,ArmorDropChances:[0.085f,0.085f,0.085f,2.0f],HandDropChances:[2.0f,0.085f]}}

only gives you a normal skeleton spawn egg in 18w22a.

kumasasa

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

lord.quadrato

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"}}}
kumasasa

Thanks, done.

CreeperMagnet_

Can confirm. Also the case for some mob spawners created with spawn eggs. 🙂

tryashtar

Correct me if I'm missing something, but is this not a duplicate of MC-92282?

migrated

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}]}}

migrated

(Unassigned)

Unconfirmed

Minecraft 1.12.2, Minecraft 18w22b, Minecraft 18w22c

Retrieved