mojira.dev
MC-4662

Iron golems spawned in a village walk around 1 place

This bug is similar to the villager crowding bug and is more visible in big villages.

Iron golems tend to walk around buildings, which were selected by villagers as their favorite (buildings stuffed with villagers), while other places of a village are Iron-golem-free.

I'm not sure, if this behavior is a bug in Iron golem AI or if Iron golems are supposed to be nearby villagers (who definitely have bugged AI). Anyway, I've decided to report this here.

I can provide screenshots if needed.
Tested on 1.4.4 server with 1.4.5 client. My village was created artificially by deporting villagers from naturally spawned willage. It has exactly 120 houses with 960 doors. Whole village is designed as a huge 37x37x37 cube.

Linked issues

Comments 10

Related to (or caused by) MC-78.

The reason for this issue is the effect of the bad villager AI. The villagers define their village (or more correctly, find the doors and then decide to ignore the more distant ones), and golems just use that result. If the village/villagers issue gets fixed, the golems should roam equally better, although golems do have the same "villager radius * 0.6" problem in their code as villagers do.

MisterSanderson

Well, the golems exist to protect the villagers, so there is no bug if they stay near them...

MisterSanderson: in this case, iron golems have both bugged and non-bugged behavior, and are also affected indirectly by the bugs with villagers. The bugged part is bugged in the same way as villagers are, so it seems that iron golems work as expected (stay near villagers).

But if one just assumes so and fix villagers (so that they will move more around), then iron golems could be left unfixed ("they were not bugged"), with bad results.

The real AI behavior for iron golem does not actually follow/stay near villagers, but just roams around the village. If they stay near villagers crammed in a single house, it means the village (in the "minds" of villagers and thus golems) has become that small, even if there are more houses around.

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

This is related or probably even caused by the same reason as MC-78 (i.e. the mechanism by which the village is defined), so as long as that is still unresolved, this should be considered to be unresolved, too (unless specifically otherwise informed by Mojang). Yet, even if MC-78 gets resolved, there is still a chance that this needs an additional change, too; depends on the details of how golems check their movement area.

I'll try and check it in the code tomorrow (Edit: erm, later today); helps in confirming the issue's presence, as experimental testing of the golem movement area is s l o w 😛

That was actually easier than expected...
Villagers and iron golems share the "wandering" AI, so for that part it is exactly as I thought; both villagers and golems need some minor touches in addition to fixing the overall way the villagers and villages interact to define the village shape and size (the "houses" or doors).

Iron golems have an additional AI routine for going from door to door (shared with zombies). That one might work ok without changes, although seems it might have a minor "issue" if the village has less than 16 doors. (But that would be another bug report, and I'm not bothering until MC-78 gets fixed.)

I can assure you Tails that this issue is still here together with villager AI issue. I upgraded my server to 1.5.1 I still see Iron golems only around houses stuffed with villagers.

I've just made artificial village in latest snapshot. It looks like the Golems are OK, but the villagers seem to crowd in 1 house again. As a result, Golems look like they are trying to protect the whole village but prefer to be near the crowded house.

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. If this has been done, we can reopen the issue.

Keep in mind that the "Resolved"-Status on this ticket just means "Answered", and that we are waiting for further information on whether this issue still exists or not. We will reopen it as soon as the requested information has been deliviered.

No response for over a year.

David

(Unassigned)

Plausible

AI, golem, iron, village

Minecraft 1.4.5, Minecraft 1.4.7, Minecraft 1.5

Retrieved