Villagers cannot enter a bed from the “foot” part of the bed if there is a block at the height of 2 blocks from the bed.
Note that if the bed is placed the other way around, so the villager touches the “head” part of the bed, or from the side as seen in the picture, it can sleep regardless of what blocks are on top of the bed both at height 1 and 2.
Even placing a rail block, which has no collision, on top on the position 2 blocks from the foot part of the bed somehow prevents the villager from sleeping, here i’ve used a trapdoor the block above, but note that that does not affect villager sleep either even on the foor part of the bed.
We do not have enough information to reproduce this issue.
Please include the following information to help us understand your problem:
Please also attach any needed commands, add-ons/behavior packs, data packs, resource packs, screenshots, videos, or worlds needed to help reproduce this issue.
Refer to the Bug Tracker Guidelines for more information about how to write helpful bug reports. Bug reports with insufficient information may be closed as Incomplete.
This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines -- 💬 Community Support -- 📧 Mojang Support (Technical Issues) -- 📧 Microsoft Support (Account Issues) -- 📓 Project Summary -- ✍️ Feedback and Suggestions -- 📖 Game Wiki