A mob spawner for an Iron Golem only spawns them above blocks and not in the air or water. This contrasts the behaviour of other mob spawners like zombies or spiders which allow them to spawn midair.
Steps to reproduce
Place a mob spawner with an iron golem:
/setblock ~ ~1 ~ spawner{SpawnData:{entity:{id:iron_golem}}}
Place a half slab above it -> no iron golems will spawn.
Place blocks around the spawner -> iron golems will spawn on top of them.
Screenshot of bug
Attachments
Comments 6
Here is an update command for 1.16.2 release candidate 1. /setblock ~ ~ ~ minecraft:spawner{SpawnData:{id:"minecraft:iron_golem"}}
The reason for the bug is that the Iron Golem has a custom checkSpawnObstruction function which also checks for an opaque block below, which is inconsistent with all other usage of the function, as it is only supposed to check for obstruction.
Affects 24w39a. The updated syntax for the command is:
/setblock ~ ~1 ~ spawner{SpawnData:{entity:{id:iron_golem}}}
Place a slab above the spawner and it'll never spawn an iron golem until there is an available block nearby.
Also, would like to request ownership to maintain the report as the OP hasn't been active in 5 years.
This is now a bug in 19w13a since skeletons don't spawn above water or in the air and only spawn on a block that is nearby. This is annoying for my skeleton farm. :/