The bug
I am trying to build a trading hall on my world and I notice that jobless villagers entering the area are automatically taking certain jobs when there aren't associated work blocks for them to attach to. When I run the /data get entity [ID] Brain command, the newly entering villagers are attaching to blocks that are already claimed by other villagers. Breaking that block and rechecking doesn't change the associated block.
How to reproduce
From @unknown in this comment
Have an enclosure with a couple of villagers in
Place one jobsite block of any type
Trade with the villager who aquired the job to lock it in outside working house (2000-9000 tick) quickly break the jobsite block and replace it with the same type and observe a new villager have aquired a profession and both the locked in and new villager will show they have claimed the same jobsite.
→ ❌ When the time of the day reaches 2000, both will begin to work at the same jobsite. Logging out and back in to the game wont change this.
Linked issues
is cloned by 1
is duplicated by 57
relates to 1
Comments 42
I'm very interested, Mr. Villa-Lobos. Thank you. The pathfinding updates seem to have made this happen less often, but it is still occuring.
I have found that it is easy to cause two villagers to claim the same job site block by rapidly breaking and placing it (can take several tries — noticed when I was trying to get librarians with specific enchanted books). However, when this is the case, they will both lose their jobs if the block is broken again.
Sometimes it can even cause more than two villagers to claim the same block — I managed to get three.
I think that there are two related problems that cause (at least some of) these issues:
1) Villagers randomly disconnect from their workstations
2) Villagers that have had their trades locked (by having at least one completed trade) do not automatically try to connect with a workstation (or, possibly, do not try to connect to a workstation until after unemployed villagers have done so, but when locked villagers have lost their workstations I've never seen one automatically reconnect to one, regardless of how many or what types of other villagers and/or workstations are or are not nearby).
These two problems together mean that villagers will lose their workstations and those workstations will be picked up by a different villager, leaving the original villager unassigned and unable to renew its trades.
I agree with Scott Caton's comment.
I am also still seeing this in my village in 1.16.4. I place a job site block, a villager claims it, and I will level that villager up all the way to Master. Then, I will come back later and find a Novice villager working at that job site block, and the Master will be wandering around. I guide the Master back to their original job site block (by breaking and replacing it), and yet I will still see a Novice working at the job site block when I come back later.
Can confirm this also happens on Minecraft 1.14.3 Pre-Release 3 if anyone is interested.