Pekoneko117
- Pekoneko117
- JIRAUSER560576
- Europe/Stockholm
- Yes
- No
I did some testing on this and here are some takeaways.
1. When new villagers are added to the village, they may be placed in any random location in the hierarchy order. They could become the new leader, the tail, or somewhere in-between. This confirms Pekoneko117's findings. Although Pekoneko117 stated that the entire order is scrambled, more specifically the new villager can be inserted at the beginning, end, or somewhere in the middle of the order. But the previous order remains intact excepting the new insertion.
2. When every bed in the village breaks, the order completely scrambles. This kind of makes sense given that a village is only formed with the first bed.
3. As of 1.20.72, on Nintendo Switch, every time the user logs in and out, the villager hierarchy order reverses. If the villagers were initially in the order 1, 2, 3, 4, upon logging out and back in the order will be 4, 3, 2, 1. However, if you login and out and then in and out again the order is back to it's original. This appears to confirm Reed Cartwright's code observation that "On Android, the implementation of std::unordered_map tends to reverse the order of villagers between saving and loading data to NBT." This reversal problem does not exist on the Windows PC Bedrock version as of 1.20.72.
4. The villager hierarchy theory appears to be true as of 1.20.72 on Nintendo Switch and Windows PC. You can tell the hierarchy order by breaking all the workstations, and placing them down again. The order in which the villagers claim them is the order of their hierarchy. I used Universal Minecraft Tool to verify that the village origin/center point follows the villager hierarchy order and their POI.
The take away problem is that the village origin is unpredictable due to the hierarchy order changing too easily. The solution should include a somewhat easy or at least consistent way to determine the village center so Iron Farms can work reliably. Added villagers should come at the end of the hierarchy order, not somewhere in the middle or beginning.
Workaround:
One potential work around is to expand the village by placing 4 workstations on the outskirts. That is, keep the beds inside the village boundaries and add workstations in the expansion range of the village. Since beds are prioritized as origin points and workstations can expand the village boundaries but won't act as an origin point if there are beds for every villager you can expand the village so the center becomes the geometric center of the village boundaries, allowing you to control where iron golems spawn. This can be done in any natural village meeting the requirements for iron golem spawning.

Hi everyone!
I have made a "quick" demo, showing how a village is created, how the bounding box (village size) works, and how the first villager in the list, (the one I call leader) does matter when manipulating a village, as the center is the middle point of the square (or rectangle) that is the village size.
-In the video I explain briefly how the village size expands/where is created from.
-I show how the bounding box doesn't get recalculated until you update the village (adding or destroying POI) so the village size works the same as a BUD switch from Java redstone. (in my opinion a bad thing, as It should be dynamic/automatic)
-I show how adding more villagers may scramble the order in which the villagers are ordered and will make the first villager and a random villager to switch positions, making the village's bounding box change if you update it continuously.
-Also, how the order between those 2 villagers change with log outs and log ins, and how killing that "bugged" villager will make the order return to a stable state, making the first villager be the first permanently (if you don't add more villagers that could get "bugged" the same way).
-After testing myself and receiving reports/videos from people suffering from this problem while building my iron farm design, it's clear that the order scramble chance is different depending in which platform they are playing in.
https://youtu.be/go4ySjnZKU8