mojira.dev
MC-278849

The function of the villagers to spawn iron golems is abnormal

Whats the problem

The map is an iron golem farm. When the villagers are scared by zombie, they totally spawn 4 iron golems at the same time. It does work in 1.19.2 and up. However, the villagers only spawn 2 or less iron golem when they are scared in 1.21.3 and up.

The Bug

Here is the link of the video of running this iron golem farm in vanilla environment (Includes 1.19.2, 1.21.1, 1.21.3 and 1.21.4)

The link: https://drive.google.com/file/d/1xQaZZuF8KHxZavkjtcvnkT-MXCi7YsoN/view?usp=sharing

In the video, there is no problem in 1.19.2 and 1.21.1.

In 1.21.3 and 1.21.4, I respawn all the villagers to see if it is MC-277889. Unfortunately, it isn't.

My Thought

(There is a redstone clock, which is about 35.2s)

I think it is because the cooldown time of spawning iron golems is abnormal. Sometimes, when I run the clock one more time, the villagers can spawn 4 iron golems at the same time. Therefore, I guess there are some problems of the cooldown time of spawning iron golems.

Attachments

Comments 4

Hi! Can you check what the first snapshot version is that doesn't work as expected?

This ticket will automatically reopen when you reply.

This bug already happened in 24w33a, which is the first snapshot of 1.21.2

The test video link: https://drive.google.com/file/d/1I9-mFobl9Pu91OG0SrjDP9uSLbbDXEv3/view?usp=sharing

I can provide some context to this-
It appears the golem detection is bugged where some villagers outside of the 16 block detection range detect golems. This is not the same as the bug where upgraded villagers detect them really far away, it's a new 1.21.4 world I tested in. Weirdly, it seems random which villagers are affected, as sometimes villagers closer to the golem don't see it. It also seems reloading the villagers seems to change this/cause it, but it's just a hunch I have no proof on that, I just noticed the farms seem to work better when I first open the save in then dont when I fly away and fly back.
Screenshot is from carpet ai tracker overlay, but I checked this in vanilla by checking the villager data directly.
For anyone to test themselves-

data get entity @e[type=minecraft:villager,sort=nearest,limit=1] Brain.memories."minecraft:golem_detected_recently".ttl

I don't know which version this started, perhaps I'll test them all later.

[media]

I've noticed that the extended range seems to be no more than 18 blocks. I'm not sure if each broken villager has their own incorrect detection range, but at least on some of my villagers they could not detect an iron golem past 18 blocks (below them). It also seems to me that the behavior is caused at birth (maybe also natural spawning?) rather than loading/unloading.

HyperEagle49640

(Unassigned)

Community Consensus

Platform

Normal

Entities, Mob spawning

1.21.4

Retrieved