Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-3927

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 18w30b
    • Minecraft 1.4.5, Minecraft 1.7.2, Minecraft 13w48a, Minecraft 13w48b, Minecraft 13w49a, Minecraft 1.7.3, Minecraft 1.7.4, Minecraft 1.8-pre3, Minecraft 1.8, Minecraft 1.8.9, Minecraft 1.9 Pre-Release 2, Minecraft 1.9 Pre-Release 4, Minecraft 1.9, Minecraft 1.9.4, Minecraft 1.10.2, Minecraft 16w33a, Minecraft 16w35a, Minecraft 16w40a, Minecraft 16w41a, Minecraft 1.12.2, Minecraft 1.13-pre1, Minecraft 1.13-pre6
    • Confirmed

      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).

        1. Untitled.png
          Untitled.png
          524 kB
        2. 3 Iron Golems in ground.png
          3 Iron Golems in ground.png
          260 kB
        3. 2013-12-09_18.46.30.png
          2013-12-09_18.46.30.png
          68 kB
        4. 2013-11-26_19.00.31.png
          2013-11-26_19.00.31.png
          61 kB

            Unassigned Unassigned
            a_bakedpotato matthew
            Votes:
            21 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: