The bug
Standing 3 blocks away from a bed in the north/west direction allows you to sleep in it. However, when standing 3 blocks away in the south/east direction, it gives you the message "You may not rest now; the bed is too far away" instead.
[media]Linked issues
relates to 1
Attachments
Comments 4
Same exact issue happens with the distance a hostile mob is from the bed
If any zombie moves from the green emerald block to any red redstone block, the player will not be able to sleep and will receive the message "You may not rest now; there are monsters nearby"
[media]Could you create a new ticket for that? Though closesly related, I think it should count as a separate issue.
related to MC-167416
Can confirm. Seems like the area expands one block further into negative coordinates than it does into positive coordinates.