mojira.dev
MC-73724

Iron golems no longer actively seek out hostile mobs

The bug

Iron golems no longer aggressively seek out dangerous mobs near its village unless attacked. It does work to an extent still however. Any time between immediately and after a long pause, the iron golem will attack the mob(s), but by that time it can be too late for a villager.

How to reproduce

You simply need a village capable of spawning an iron golem. After nightfall you can notice it seems "unaware" of many of the hostile mobs until they have been nearby for a short time.

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

MC-49606 Iron Golems not attacking zombies Resolved MC-79549 Golems not attacking Mobs Resolved MC-92221 Iron Golems Don't Attack Resolved MC-93334 VillagerGolem loses aggro for a temporary time. Resolved MC-96112 Iron Golems no longer actively seek out hostile mobs - they simply wander until they come across them, and even when they look at them will not do anything. Their attacks are also limited by blocks around them. Resolved

Attachments

Comments 17

Confirmed in 1.8.1-pre3.

Confirmed for 15w45a
Iron Golem's AI is very slow.
Players create the Iron Golem also have this issue.

7 more comments

I made an iron golem, and they do ignore any mob that comes near them, until you attack it, and then they will attack it. It seems rarely it will attack something on it's own, probably because that mob attacked the golem.

I am glad to see that this issue has been noticed and tracked. Yet it has been a long time since the bug was reported. I do not know what kind of cooperation this website has with Mojang, but does anyone know what kind of progress has been made towards fixing this?

Please link to this comment in the description

The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

It looks like the path finding of the iron golems has often problems, when the zombie are standing under roofs or on stairs (method net.minecraft.pathfinding.PathNavigate.getPathToPos(BlockPos)), which might happen because of the larger hitbox of the iron golem.

Keep in mind, that iron golems have by default only a follow range of 16 blocks and can only move in 0.6 times the village radius away from the village center if there is a village nearby.

Confirmed for 1.13.1.

William Rundstein

coschevi

Confirmed

iron_golem

Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 15w45a, Minecraft 15w46a, Minecraft 15w47c, ..., Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w03b, Minecraft 19w03c

Minecraft 19w08a

Retrieved