mojira.dev
MC-98007

Custom Animal Spawners not working

When using the below code, the sheep spawners works, but no actual spawnage occurs .. i cant see anything around to say this is broken or

/setblock ~ ~ ~ mob_spawner 0 replace {SpawnData:{id:Sheep,Color:1}}
/setblock ~ ~ ~ mob_spawner 0 replace {SpawnData:{id:Sheep,Color:1}}

Comments 6

It starts as a pig spawner because the SpawnData tag is not populated. Once the pig spawns, it becomes a sheep spawner. If you want it to skip the current entity in SpawnData, you'd set Delay to -1:

/setblock ~ ~ ~ mob_spawner 0 replace {SpawnPotentials:[{Weight:1,Entity:{id:Sheep,Color:1}}],Delay:-1s}
/setblock ~ ~ ~ mob_spawner 0 replace {SpawnPotentials:[{Weight:1,Entity:{id:Sheep,Color:1}}],Delay:-1s}

You can also use the /blockdata command to check a tile entity's data, and you'll see the spawner does still have the sheep waiting to be selected:

/blockdata ~ ~-1 ~ {}
/blockdata ~ ~-1 ~ {}

Either im doing something wrong or they're broken .. i been sitting here for the last 30min watching these 2 spawners an it hasnt spawned a single sheep using either of the 2 codes

Do you have grass for them to spawn on?

Well that defeats the purpose of what i wanted if they only spawn on grass. Guess i'll have to use cb's with summon instead

spawners follow the exact spawning conditions, sheep, pigs, chickes and cows need grass

As a work-around, you can summon the sheep riding an entity that does not have any spawning rules, such as FallingSand (which despawns instantly since Time defaults to 0):

/setblock ~ ~1 ~ mob_spawner 0 replace {SpawnPotentials:[{Weight:1,Entity:{id:"FallingSand",Passengers:[{id:"Sheep",Color:1}]}}],Delay:-1s}
/setblock ~ ~1 ~ mob_spawner 0 replace {SpawnPotentials:[{Weight:1,Entity:{id:"FallingSand",Passengers:[{id:"Sheep",Color:1}]}}],Delay:-1s}

Warren Liddell

(Unassigned)

Unconfirmed

spawners

Minecraft 1.9 Pre-Release 3

Retrieved