18.104.22.168 Beta, 22.214.171.124 Beta, 1.17.30, 1.17.40, 1.17.41 Hotfix, 1.18.2 Hotfix
The changes to iron golem spawn logic in 126.96.36.199 Beta include a change to the check for block collisions during a spawn attempt. Previously, only collisions with full or solid blocks would block spawns. That had the problem of allowing spawns inside slabs (
MCPE-56833). The new logic checks instead for collisions with any block that has a an entity collision box. That has the problem of blocking spawns adjacent to glass, glass panes, leaves, ice. Iron golems also will not spawn on snow layers, which limits their spawning in snowy biome villages.
- In a void or high in the air, make a 5 x 8 platform, then place 20 beds on the platform, and destroy the platform so you have just the beds.
- Nearby to the side, setblock a stonecutter, then a villager on top, and wait for it to link.
- Repeat step (2) nine more times with the stonecutters a block apart in a row, so that you have 10 villagers who can work and cannot move or bump each other.
- Above the beds, make a 12x12 platform of solid blocks.
- Cover the solid blocks with snow layers of any height. Wait several minutes.
- Remove the snow layers from the previous step, and place a row of the following on top of the solid blocks with two blocks between each row: glass blocks, leaves, glass panes, ice. Then delete the row of solid blocks to the north or west of each row (see picture). Wait several minutes.
Iron golems spawn on top of the blocks in step (5) and on the solid blocks between the rows of added blocks in step (6). In other words, the expected behavior is
- Iron golems can spawn on common naturally-generated village terrain like snow layers. Note that the fix to
MCPE-41886lets them spawn on solid blocks below farmland and grass paths and then have their position offset upward.
- Iron golems would have the same collision checks as environmentally spawned mobs like sheep and skeletons, so that they can spawn next to blocks like glass, glass panes, fence posts, etc. In other words, they should check for whether the block material is solid-blocking, and then if it is solid-blocking check the actual collision box to see if the iron golem can fit next to it (which is what environmentally spawned mobs do). Spawns should only fail if a block made of solid-blocking material overlaps the collision box (axis-aligned bounding box) of the golem.
Iron golems do not spawn in steps (5) or (6).