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

Villagers' iron golem detection range is increased for villagers upgraded from 1.21.1 or earlier

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 24w44a, 1.21.3
    • None
    • Confirmed
    • Datafixer, Mob behaviour

      According to the Minecraft Wiki, an Iron Golem is detected by a Villager when it is within 16 blocks of the villager.

      I have recently discovered that the Iron Golem Detection range for villager is far greater than that in 1.21.2 and 1.21.3, while it works as intended in 1.21.1. I assume it must be a bug as I have not seen any patch notes regarding the Iron Golem detection range.

      The detection range in 1.21.2 and 1.21.3 is about 45 blocks instead of 16. This can easily be tested by placing three Villagers with a bed each and a Zombie to scare, and an Iron Golem more than 16 but less than about 45 blocks away from the Villagers - in every version up to 1.21.1 (including 1.21.1), the Villagers will spawn a new Iron Golem if there is any space for it. In 1.21.2 and upwards, the Villagers won't be able to spawn a new Iron Golem. Using gnembon's Carpet mod, you can also see the Villager's "Iron Golem Seen" counter go back to 600 ticks every 10 seconds after counting down.

      How to reproduce:

      Attached is a world in 1.21.1 containing an iron farm, an iron golem placed 18 blocks away from the villagers, and a repeating command block to check the last time a villager detected an iron golem around.

      1. Open the attached world (MC-277889.zip) in 1.21.1.
      2. Periodically check the repeating command block's output until there is no number in the output, at which point the villagers will try to spawn a golem.
      3. Wait until the villagers spawn a golem.
        The villagers successfully spawn a golem.
      4. Upgrade the world to 1.21.2 or higher.
      5. Periodically check the repeating command block's output.
        The output never reaches 0, which means the villagers now detect the iron golem that is 18 blocks away, so they will never spawn a golem.

      Expected result:

      The villagers' iron golem detection range would not change when upgrading to a newer version.

      Observed result:

      The villagers' iron golem detection range changes from [0, 16] to [16, ~45] when upgrading to a newer version.

            Unassigned Unassigned
            pingufps pingufps
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: