mojira.dev
MC-3927

Iron golems spawning in slabs, glass, farmland and grass path

Risk of confusion

This report describes only iron golems spawning inside non-opaque non-full cubes.

See MC-130270 for them spawning even inside opaque full cubes, which started during the 1.13 snapshots.

This issue reappeared in 1.14, see MC-148955 for more details.

The bug

Iron golems can spawn in blocks which are considered as not normal cube (normal cubes are: state.getMaterial().isOpaque() && state.isFullCube() && !state.canProvidePower()).

This makes them spawn in slabs, glass, farmland, grass path, ...

How to reproduce

  1. Create village with villagers

  2. Fill all air blocks at the village center with for example glass

  3. Wait for an iron golem to spawn

Code analysis

Based on 1.12.2 decompiled using MCP 9.40

The method net.minecraft.village.Village.isAreaClearAround(BlockPos, BlockPos) only considers a spawn location as invalid if the blocks at this position are net.minecraft.block.state.IBlockProperties.isNormalCube(), it should probably instead use logic similar to the one used in net.minecraft.world.WorldEntitySpawner.findChunksForSpawning(WorldServer, boolean, boolean, boolean).

Linked issues

MC-40992 Iron golems can spawn through slabs and glass Resolved MC-42117 Iron golems spawn in blocks Resolved MC-55312 Golems spawn in Glass Resolved MC-67816 the Iron Golem appear through the glass Resolved MC-69919 Iron golems spawning inside of glass Resolved

Attachments

Comments 23

Should I open a new issue, or can this be reopened? I have had Golems spawn anywhere there's at least 3 blocks of space. And that includes stairs. And golems don't spawn on stairs, they spawn on the ground below, and thus get completely stuck.

EDIT: Minecraft 1.7.2.

I'd like to add a bit more info because the main post is hard to follow.

The main issue here is:
If all of the default spawn conditions are met, Iron Golems are able to spawn inside of slabs and glass.

They do require a solid ground block for them to spawn on top of, they still spawn even if half slabs or glass is in the way.

Is this still a concern in the latest Minecraft version 1.7.4? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Confirmed still an issue in 1.7.4.

You can check out the image proof here:
http://i.imgur.com/osB6WUb.png

Edit: Sorry for the late reply, I was waiting to see if any spawned for about 2 hours, which he eventually did. Anyway, if this might help he spawned through 2 slabs, I have a layer of stone, a slab and then another slab floating above that, it seems he spawned through both of them.
Edit 2: For further evidence, you can check out the screenshot of the floor cutaway attached to the bug post for verification.
Edit 3: Grammar.

Is this still a concern in the latest Minecraft version 14w08a? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

13 more comments

This should be marked as Fixed, I can confirm that iron golems no longer spawn in slabs. Also the bug report MC-135128 that stated that golems could no longer spawn in slabs has been marked as Works as Intended, thus proving Mojang has intentionally fixed this bug!

Are glass, farmland, and grass paths fixed as well?

I don't know about those blocks, but it can be easily tested by using a large multi village iron farm and placing the glass/farmlang on top of a solid, opaque spawning platform (allowing for the golems to spawn there) to see if the golems spawn within the glass/farmland blocks.

Patrick Callahan

In 1.14.4 Golems are spawning in farmland and it's really annoying - it would be nice to have a command to stop any certain mob from spawning at all.

Then please create a new report with exact reproduction steps for that version.

matthew

(Unassigned)

Confirmed

iron_golem, spawning

Minecraft 1.4.5, Minecraft 1.7.2, Minecraft 13w48a, Minecraft 13w48b, Minecraft 13w49a, ..., Minecraft 16w40a, Minecraft 16w41a, Minecraft 1.12.2, Minecraft 1.13-pre1, Minecraft 1.13-pre6

Minecraft 18w30b

Retrieved