mojira.dev
MC-144062

Mob Spawners not spawning Iron Golems correctly

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

[media]

Attachments

Comments 6

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. :/

Can confirm this still exists in 1.16 Pre-release 4

Here is an update command for 1.16.2 release candidate 1. /setblock ~ ~ ~ minecraft:spawner{SpawnData:{id:"minecraft:iron_golem"}}

Can confirm in 1.17.1.

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.

Jonathan Carroll Baker

sof

(Unassigned)

Confirmed

Mob spawning

Minecraft 1.13.2, 1.16.2 Release Candidate 1, 1.16.2, 1.17.1, 24w39a, 1.21.3, 1.21.4

Retrieved