there are a few villagers that even after having ample opportunity to do so, refuse to sleep in a bed. I'm at my wits end trying to fix this!
Linked issues
is duplicated by 4
Comments 7


Not only did I blocked off access to the other beds, I destroyed them too, and the issue still persisted.

I think I found the bug, and how to reproduce it (Since you said you blocked off access to the other beds, I'm supposing that you are stopping the villagers from getting to the locations of the previous beds)
When a villager does not have a bed, it will regularly check for a bed in the surrounding area. If it finds one, it will note the bed as being his. The villager will pathfind to that location at night, and only update the bed once it has arrived at the destination. This means that the villager will only look for another bed to sleep in after having gone to the previous bed's location and realized the bed's gone.
To reproduce, spawn a villager and a bed, blocking access from the villager to the bed (The villager still has to detect it, I think line of sight is required?), break the bed, place a new one to a location the villager can access. At night, the villager will not attempt to sleep in the other bed, it will attempt to pathfind to the older bed, despite it being broken.
Until this is fixed, you can allow your villagers to pathfind to the locations of the previous beds. If it is nighttime, they will go back to sleep in their new beds after having realized their old beds are gone
Hope that made sense and sorry for the long answer!

I don't have the same problem, could you have possible moved or broken the beds?

I have the same problem: villagers saw the beds in my house next to the village, could not get there, but kept on trying, so I destroyed the beds, but they still try and get there. Sounds exactly what Tim described (thank you for that excellent description!).

If someone wants the specifics, the location of the bed the villager is attempting to go to is stored in its NBT data of Brain:{memories:{"minecraft:home":
{pos: [I: x, y, z], dimension:"minecraft:overworld"}
}} (Wait, they can pathfind to the nether? I gotta try that).
Also, I am guessing that the same bug applies to the workplace area, as it is being stored in the same place, but I could be wrong.
EDIT: Yes, the same bug is applied to work stations, see MC-149835

In my case villagers returned to village when I turned down all torches.
Can you give more detail about the issue? Other beds in the vicinity could be causing the problem, as the villagers might be attempting to pathfind to another bed