My villagers are dying off in my trading hall in my realm. I thought they were killed by mobs at first but that is not the case. They were slowly vanishing over time. I finally caught one in the act of dying while entering the trading hall. He was just lying in his bed and suffocating. This happens eventually to all of the villagers in the hall repeatedly. I repopulated it three different times before I finally caught it happening.
I have attached several pictures to show the layout of the hall. There you can see the dimensions of their rooms, the light levels, and the verification that mobs cannot reach them through corners from the outside or anything.
Hopefully this is not a duplicate. It may explain why many players are having their villages become seemingly abandoned or thinking that their villagers are despawning.
Linked issues
is duplicated by 3
Attachments
Comments 15
There are actually several issues here:
Villagers get into bed in incorrect orientations and slowly shift back to the normal sleeping position. This can cause them to suffocate if there are solid blocks nearby.
Sleeping villagers, upon load of the game, stand up in their beds, causing them to suffocate if there is a 2 high ceiling with solid blocks. Weirdly enough, in my case this only seems to affect villagers lying on bed that are set up in east (feet) to west (head) direction. However it could also be a chunk border issue as all the affected beds were in line.
A villager can directly, without other elements mentioned above, suffocate in the bed. Seen with a farmer, but this issue seems rarer than the other two (which repro every single time).
I just had this same thing occur - Built a trading hall last night - fenced in 13 villagers in separate spaces and gave them a bed, 1 open block to stand, and the designated workbench. After I got them all linked to the right beds I observed them sleeping and working as they should. This morning I logged into to show someone my trading hall and all the villagers were asleep in their beds, logged out and back in about an hour later and all 13 villagers have vanished.
I will note that my trading hall is currently only 2 blocks tall so if what Specialistol said is true then I can see they likely stood on the beds and suffocated when the realm loaded up for me. so many zombie villagers converted all for nothing 😞
this dosnt happen that much, though it does still happen. since we re retreading old ground... i ll note that villagers are also still despawning for no apparent reason. check the forums and... maybe the bug tracker as well.
I was unable to reproduce the issue with Villagers suffocating in a 2 high room - the only way I could reproduce it was by placing slabs on the floor around the bed, which doesn't seem like a fair reproduction as it means the Villagers then have no safe space to stand.
If anyone has a test world or a video showing their setup it would be appreciated!
The following information was learned by experimenting in 1.14, but probably applies much farther back, at least 1.9.
When a villager leaves their bed, they need a block to stand on. They pick one by examining the 10 blocks surrounding the bed in a particular order. What they're looking for is the following configuration adjacent to either half of the bed.
 | air |
(bed) | air |
 | solid block |
If the game can't find this configuration in any of the 10 positions, it uses a last resort of placing the villager on the bed. However, in this case it does not check for an obstruction. When standing on the bed, the villager's head rises higher than normal, so if there is a solid opaque block either one or two blocks above the bed, their head will be inside it and they will suffocate upon waking up.
 As a side note, a very similar mechanic occurs when a player wakes up, and likewise, the last resort is to place the player on the bed without any check for obstruction. This can cause the player to start suffocating upon waking up, although a player can save themselves by breaking the block their head is in. (Note: Many people think that when a player gets out of bed, they're placed at their respawn point, but that's incorrect. The respawn point is only used after the player dies.)
In case anybody is interested, the order that villagers check the 10 adjacent blocks is shown in the following diagram.
9 | 8 | 10 |
---|---|---|
6 | bed (pillow) | 7 |
4 | bed (foot) | 5 |
2 | 1 | 3 |
Unfortunately, the corresponding diagram for players is more complicated and depends partly on the orientation of the bed, so it's difficult to describe either in text or in a diagram.
In Windows 10 PC v. 1.16.0.59 Beta, there must be 2 air blocks above the bed or the player will suffocate.Â
Example: Air Block; Air Block; Bed; Floor, player will not suffocate; Air Block; Bed; Floor, player will suffocate. Â
Â
Resolving issues that were marked as fixed in the 1.15 and 1.16 Betas, now that 1.16.0 is being released.
This appears to still be happening. Using 1.16.1 on the PS4, and recently on three separate occasions I’ve visited my villager hall to find that two or three of the villages have died and been replaced by baby villagers. The hall is well lit, relatively spacious, and free of enemy mobs, so I can’t understand what would cause these deaths other than possible suffocation.
I can confirm this issue. When sleeping villagers are loaded (load game or travel through dimensions). They are loaded in weird positions, and slowly shift back into their normal sleeping position. during the process their head can end up in solid blocks even 2 blocks away from the bed.