Villagers become unable to move when their workstation is placed nearby. Placing the workstation will cause villagers to freeze immediately, and they will only return to normal once the workstation has been broken.
After the workstation has been broken, they will walk over to where it had been placed, and then turn around and walk back to whatever they were doing before.
Only seems to affect librarians but have not tested all villager types. All librarians in my survival world were affected, but farmers and fletchers have not done it at all.
Some users report that even breaking the workstations does not unfreeze the villagers, and that they are missing data.
Code analysis can be found in this comment by @unknown.
Related issues
is duplicated by
Attachments
Comments


I also have this issue, affecting 1.19.3. Also coincidently the affected villagers were librarians. Although it's only some of them. The ones that are fine are ones I moved and placed their workstations after moving. The rest I had removed their workstations for an extended period of time.
Using the /data command on an affected villager, I discovered that they don't have the tag "minecraft:job_site" or "minecraft:potential_job_site" anywhere. Placing down a workstation for them to claim doesn't seem to give them back the tag. It's as if the tag or at least the ability to gain the tag has been removed.
EDIT: I have attached the screenshots of the villager's data using the /data command

I have the same bug in my current world and I reported it which turned into a duplicate report of this bug.
I'm here to say something.
I actually previously had the same bug happen to two fletcher villagers in the same world. Somehow the bug fixed itself over time and the bug was transferred to my farmer villagers.

Hi I'm here again to say that I believe I have found a temporary fix for the bug until the bug itself has been fixed by developers.
As of currently I found a method that resets the villager AI.
First, remove all job blocks from broken villager AI along with other villager job blocks.
Next, place down a single variety of villager job blocks (ex: only lecterns for all your librarians).
Finally, Save and close the game and return to the menu screen multiple times until the villagers path find to their job blocks successfully and claim their block.
One final note, I haven't tested it yet but assuming it works with one type of villager it should work with others by placing down all of a single variety of job blocks and opening and closing the game multiple times.

I've also had this issue, and after pushing my villagers around for a few minutes and destroying the beds etc, only 1 out of 5 is walking around at all. the others might shuffle back toward their beds when pushed away but thats all they seem to do. Restarting the server i'm on hasnt fixed this issue either.

1.19.3 Server also has this issue. All of the villagers affected are only ones that have been traded with. Tried restarting the server, destroying workstations, beds, bells, nothing fixed. Villagers won't even turn or run away from zombies if their workstations are placed.

I have encountered this bug recently on 1.19.3 server. I have put 3 librarians inside a small room. They froze the moment I placed a lectern and they won't restock either. Removing lecterns unfreezes them.

I can also reproduce this bug. The necessary conditions seem to be that there is more than one villager in the vicinity that has been traded with (i.e. it has a defined profession) and without a current job site or potential job site. When the appropriate jobsite block is then placed where multiple such villagers can path to it, one grabs it as a "potential job site", then it and one other will freeze, neither making any progress towards the jobsite or walking anywhere else.
The frozen villagers will still do other activities such as breeding or sleeping if they can do these without having to walk anywhere. Also, if a third villager meeting the conditions comes close to one of the two frozen villagers, it may take the place of the frozen villager that was farther away.
Looking at decompiled code, I think you may have introduced an error when refactoring YieldJobSite. Prior to 22w45a, the code in part looked like this:
protected boolean checkExtraStartConditions(ServerLevel serverLevel, Villager villager) {
if (villager.isBaby()) {
return false;
}
return villager.getVillagerData().getProfession() == VillagerProfession.NONE;
}
In other words, the check returns true only if the villager is not a baby and has no current profession. The AI routine itself has that villager look for a nearby villager having the necessary profession but with no jobsite or potential jobsite, and gives its potential-jobsite claim to that villager.
The corresponding part of the new code looks like this
if (villager2.isBaby()) {
return false;
}
if (villager2.getVillagerData().getProfession() == VillagerProfession.NONE) {
return false;
}
In other words, the check proceeds only if the villager is not a baby and does have a current profession. So a villager with the right profession will give its claim up to some other villager, who will then run the same routine to give it back (or pass it on to another, closer villager). And since the act of giving up the claim also clears the villager's walk destination, neither villager goes anywhere as they just trade the claim back and forth.
If I'm right the fix would be simple, just change that ==
to !=
to restore the prior logic.

I am experiencing this issue on a pure vanilla 1.19.3 server. Villager AI only returns to "normal" after a job block is broken. It's effecting about 15% of my 100 villagers.
Babies and jobless villagers are unaffected.
It's effecting various job roles, from butchers to clerics to fletchers to blacksmiths.
Frozen villagers are missing the "job site" value. Working ones are not.
I have attempted to troubleshoot this by doing the following, none worked:
Restart the server
Force time back to 0
Break beds
"remove" all other villagers except the problem villagers
Break blocks around the villager to ensure they weren't stuck via collision
Teleport the problem villager to their bed
So far, the only method that works to 'solve' the immediate issue is breaking the job block and waiting until all relationships with the block breaks. The villager goes to where the job block was and resumes normal activity. Placing the job block again doesn't always fix the issue, but sometimes it does.
Below is a screenshot of a correctly working villager, note the job site value circled
[media]
Below is a screenshot of a blacksmith who hasn't moved in multiple in-game days. Note the lack of a job site value. All of my problem villagers have "potential_job_site", never "job_site". Seems to support earlier comments regarding the logic for job aquisition.
[media]

I'm also having said issue on villagers freezing in my vanilla 1.19.3 survival world.
I discovered 4 Masons not moving around at all in a group. I attempted to solve this issue by breaking the job site and it did unfreeze the villagers. However, placing the job site back in the set locations & other locations would freeze the same 4 villagers. Trying to further solve this issue, I decided to break all job sites and let the villagers sleep. After they've slept, I would have placed them all back down. This solution did not work, 16 out of my 18 Masons are currently frozen.
Checking with the /data command confirmed each villager lost the "minecraft:job_site" or "minecraft:potential_job_site" tags. Placing and replacing the workstations do not let the villagers regain that tag.
Edit: I have added a screenshot of a Mason villager without either tag that is frozen. However, breaking the Stonecutter at the coordinates: ( -486 70 -745 ), the villager will unfreeze. Upon further research, this villager does not have a home location yet can sleep in a bed as well.

same problem in my hardcore world they just stop moving the other vilergers are fine

I also have the same issue, also with librarians. I wonder if the reason librarians are most likely to be affected is because users are more likely to have large numbers of librarians to get a bunch of enchanted book trades.

i also have this issue but with masons

If you can fix the problem With Kevin Getzoff's solution, if you ever need to move them again, move one villager at a time by only breaking 1 jobsite at a time and assuming all the others have a job the one you are moving should be able to move because its the only one trying to get to it.

Same issue; moving a bunch of shepards (the wool guys) and I've already traded with them, so I can't switch them to another job block temporarily ): removed the job blocks and they can move now, but like ): I don't want to kill them
Edit: I tried putting the job blocks back, didn't work. Left one up.
decided to pop them in a hole, and put lava on them. pushed one in a hole, accidentally hit one. He jumped up! pushed into the hole again, and they started moving? Placed the other job blocks down and they all kept moving! 😃

after rejoining my singleplayer world they keep moving for a moment. multiple rejoins from menu caused them to find workstation and started moving again