I accidentally posted in the wrong project and then I posted in what I thought was the correct ticket and there was asked to create a new ticket. I have just tested and verified that this also occurs in 1.15 Pre-Release 2.
Description: I was testing an issue that I had with the last snapshot where some villagers would not go to bed at night. I teleported to a snow village and instantly watched a villager die by suffocation, it's head was in the ceiling above or near the bed. You can see this in the screenshot I've attached. I've also included a fresh copy of the world (named Pre-Release1 Pre-Release2VillagerTest.zip) created with seed # 7333969029456169764. I have "cheats" enabled so you can quickly type in "/tp -502 70 -643" or "/tp -507 70 -642" to get to the point in the screenshot.
To reproduce:
When creating a new world with seed # 7333969029456169764 click "enabled cheats" then "create world" (or use attached saved file)
type "/tp -502 70 -643" when you spawn in the world
You will then fall down to the coordinates exactly at the screenshot point and see a villager standing on a bed with its head through the wall suffocating.
Related issues
Attachments
Comments


Hello, Greg A. Woodruff.
I tested your problem. Apparently, this is a problem of world generation (and in this case of entity generation) because, by reproducing it by hand, the bug does not occur (check the videos below).
If you find another example that works every time, come back to us with an explanation of how to reproduce this bug, please. Thank you very much!
Videos:

Thanks for the reply! It does seem that you are correct, this is a world generation issue.
I created a new world with the seed I mentioned in creative mode. Then I teleported to the location, and watched the villager suffocate (that always happens). I added a villager spawn egg to my first inventory slot and had it in my hand to place. I right-clicked on the bed, but that just set my spawn point, it doesn't let you spawn a villager on a bed. So, I right-clicked on a block of the wall next to the bed, this block is one block high, sitting on top of the floor, pretty much. This caused the issue I reported, the villager spawned on the bed and suffocated. I then right-clicked on the floor next to the bed and the villager spawned correctly. I then changed the time to midnight and the villager went to bed. I then changed the time to day and the villager got out of bed correctly.
So, I think maybe the villager in the bug I reported wasn't spawning on the floor, but the wall. Maybe during spawn it dropped on to the bed which pushed the villager up a block or even just high enough to suffocate in the ceiling. I think this, because when teleporting to the coordinates I gave, I kind of fell to the spot, but safely, this isn't unusual, I was using the block coordinates from the F3 menu instead of the XYZ coordinates. I created a video showing what I did, but it's too big to attach here, so you can view it at https://youtu.be/f9V8Q-bUmRc.
Thanks again for your help, I greatly appreciate it!