Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-140244

Iron golems cannot spawn on snow layers or next to glass, leaves, or ice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.17.40.20 Beta, 1.17.30.23 Beta, 1.17.30, 1.17.40, 1.17.41 Hotfix, 1.18.2 Hotfix, 1.20.0
    • None
    • Confirmed
    • Multiple
    • 639857

      The changes to iron golem spawn logic in 1.17.30.23 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.

      Steps to reproduce

      1. 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.
      2. Nearby to the side, setblock a stonecutter, then a villager on top, and wait for it to link.
      3. 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.
      4. Above the beds, make a 12x12 platform of solid blocks.
      5. Cover the solid blocks with snow layers of any height. Wait several minutes.
      6. 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.

      Expected result

      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-41886 lets 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.

      Observed result

      Iron golems do not spawn in steps (5) or (6).

            GoldenHelmet [Mod] GoldenHelmet
            Votes:
            13 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              CHK: