using this command:
/fill ~ ~1 ~ ~ ~12 ~ minecraft:mob_spawner 0 replace {SpawnCount:3,SpawnRange:127,Delay:1,MaxSpawnDelay:30,MinSpawnDelay:25,MaxNearbyEntities:25,RequiredPlayerRange:127,SpawnPotentials:[{Weight:5,Entity:{id:creeper,powered:1}},{Weight:145,Entity:{id:creeper}},{Weight:70,Entity:{id:blaze}},{Weight:9,Entity:{id:ghast,Pos:[372d,51d,1212d]}},{Weight:200,Entity:{id:skeleton}},{Weight:200,Entity:{id:zombie}},{Weight:30,Entity:{id:slime,Size:1}},{Weight:100,Entity:{id:slime,Size:3}},{Weight:90,Entity:{id:witch}},{Weight:100,Entity:{id:spider}},{Weight:25,Entity:{id:cave_spider}},{Weight:15,Entity:{id:magma_cube,Size:1}},{Weight:30,Entity:{id:magma_cube,Size:3}},{Weight:75,Entity:{id:wither_skeleton}},{Weight:25,Entity:{id:Endermite}},{Weight:3,Entity:{id:item,CustomName:Steak Pack,CustomNameVisible:1,Item:{Count:16,Damage:0,id:cooked_beef}}},{Weight:3,Entity:{id:item,CustomName:Arrow Pack,CustomNameVisible:1,Item:{Count:16,Damage:0,id:arrow}}},{Weight:2,Entity:{id:item,CustomName:Berserk Potion,CustomNameVisible:1,Item:{Count:1,Damage:0,id:potion,tag:{display:{Name:"Berserk Potion"},CustomPotionEffects:[{Id:5,Amplifier:0,Duration:1200},{Id:1,Amplifier:0,Duration:1200},{Id:3,Amplifier:2,Duration:1200},{Id:10,Amplifier:0,Duration:1200},{Id:11,Amplifier:0,Duration:1200}]}}}}]}
spawns correctly, the mobs spawn with the correct types, weights, tags, etc, but the inside of the spawner displays a pig.
You are missing a
SpawnData
compound containing the current entity being spawned. If you want to skip usingSpawnData
, you need to setDelay
to -1.As well, namespaces are required for entity IDs in spawners (and spawn eggs); see MC-106199.
Fixed command: