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

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 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
    • Fix Version/s: Minecraft 18w30b
    • Confirmation Status:
      Confirmed

      Description

      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.

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

        Attachments

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

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                a_bakedpotato matthew
              • Votes:
                21 Vote for this issue
                Watchers:
                23 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: