Updated description by [Helper] GoldenHelmet
Steps to reproduce
- Find or build a village with at least 1 farmer, 1 other villager, and a food supply.
- Add beds to the village until there are more beds than villagers.
- Position the player such that:
- some beds and workstations are outside of the ticking area,
- villagers can move across the ticking area boundary in the direction of those beds, and
- the farmer's bed, workstation, and farm, and at least one other bed, remain accessible to villagers within the ticking area.
- Wait at least 25 minutes.
The villagers breed until villagers >= beds.
The villagers continue to breed even after villagers >= beds.
I have attached a test world that reproduces this bug: New Village Test.mcworld
The world consists of a village similarly sized and shaped to the one described by Tim Roush in this comment. It has 26 beds in rooms around a 40 x 40 central square: 4 beds north, 8 west, 8 south, and 6 east. The player is situated on a platform to the south of the village such that the beds to the north (and, by accident, some on the east) are outside of the ticking area. To the right of the player is a pair of command blocks that recount the loaded villagers when you press the button.
The village has already been run following the steps above for about an hour. There are presently 32 villagers within the village walls. However, if you load the world and press the button you will get a count of 11 because 21 are outside of the ticking area. The village data (viewed with MCCToolChest) shows 19 villagers registered to the village. 6 of these have TS timers > 15000 (showing that they've been outside the ticking area > 15 minutes); 5 of those 6 along with 12 others can found beyond the northern central wall that runs along Z = -1, just outside the ticking area. The other high-TS registered villager and 3 others are just outside the ticking area in the northern rooms east of the central village. As soon as you load the world villagers will begin to breed. If you remain on the glowstone platform they will continue to breed as villagers wander out of the ticking area and their TS timers expire.
Villagers breed to double the bed count
Doing some testing, but it seems like villagers breed to double the bed count, causing old villagers to forget their beds and workspace blocks, and causing overpopulation. This MAY be the cause of the bug where villages expand
STEPS TO REPRODUCE:
Build a village in any world and set up more than 1 bed
Make one villager a farmer, and the others whatever you want
Make a small farm for the villagers to use
The farmer will begin harvesting and distributing the food
After some time, villagers will begin wanting to breed (hearts will appear around them)
You'll notice that when a baby is born, the old villager seems to be exiled from the village, and will forget its bed and workspace block, and begin wandering aimlessly around and outside the village.
Again, this may be the cause of the village expansion bug where villagers claim blocks thousands of blocks away from the actual village.