mojira.dev
MC-145862

Villagers try to sleep in occupied beds

The bug

At night, some villagers try to sleep in an already occupied bed instead of finding another one. This can happen while other beds are available.

How to reproduce

  1. Go to a village

  2. Wait for the night

  3. Watch what villagers do when they go to sleep

Example

Here is an example in video:

[media]

Linked issues

Attachments

Comments 12

This usually happens if a villager is spawned next to an occupied bed, which will cause this behavior.

I'd like to add that they also can sleep in a bed on the other side of a glass wall... didn't try it with solid blocks, though. 

Still confirmed for 19w12a in a from v1.13.2 converted world. And a lots of beds around are free but the villager didn't noticed.

The free bed doesn't even have to be far away, they might stand right next to it and don't notice.

I've been experimenting with this a lot. Each villager picks a bed when they are spawned, In general it seems 80-90% of the time they will choose the bed closest to them even if it is already 'owned' by another villager.  If that bed is destroyed, they will choose another.  I would expect they would also choose another bed if moved from one village to another but I've yet to see this happen. (moved villagers 1000+ blocks to a different village, they do not sleep)

2 more comments

Still in 1.14 Release! It's not fixed!

Still observing this behavior in snapshot 1.14 .1 pre-release 2.

Reopened as there have been multiple reports, such as MC-155457, about this still happening after the last fix attempt,.

Why this issue is still in 1.16.3?

Still happens in both 1.16.5 and 21w14a, although it seems to only happen when there's either no open beds or they simply can't pathfind to one. The 1.16.5 screenshots I've posted show a villager refusing to go past the doorway despite tracking the unoccupied beds inside, the 21w14a screenshot shows the much more common attempt to use an occupied bed with none immediately available.

Something to note is that the villagers seem to be making repeated attempts to pathfind to/use the bed, and seem to only very occasionally (and seemingly at random) give up and wander the village in search for another (which is what I assume the intended behavior is, but it's just not happening consistently whatsoever).

Gravinser

coschevi

Confirmed

Mob behaviour, Village system

bed, villager, villager-sleeping

Minecraft 19w11a, Minecraft 19w11b, Minecraft 19w12a, Minecraft 19w12b, Minecraft 19w13a, ..., 20w13b, 20w14a, 20w15a, 20w17a, 20w18a

Minecraft 19w14a, Minecraft 1.14.1 Pre-Release 1, 20w19a

Retrieved