Sleeping in a bed above layer 128 causes what I think is a client-side signed integer overflow, setting your y to ~-128 and causing you to fall from there. Leaving the bed works as expected.
Linked issues
is duplicated by 5
Attachments
Comments 16
After a little further testing, it doesn't appear to affect single-player. Added a screenshot as requested.
Can confirm for SMP.
The screen doesn't fade out, it instantly blackens.
When leaving the bed in the morning the player gets damage.
My setup is quite unspectacular. Height is 155, two beds, the chickens do not play any role 😉
When sleeping the y coordinate falls to -500 and when the night is over I'll get a little damage.
Still in 1.7.4 (vanilla client, bukkit server) and even worse than before now that it is common for terrain to generate up this high. Tried to sleep on top of a mountain and it appears that I fell into the void so I pressed Leave Bed and luckily appeared back on land but with the "crunchy knees" damage sound.
EDIT: This is probably because Java's "byte" is a signed -128 to 127, so when it teleports the player from the position they right clicked the bed from to the position of being on the bed, the y coordinate has an overflow. I would be curious if putting a bed at y=256 would teleport you to approximately y=0 when you were sleeping.
Unable to reproduce. Can you attach a screenshot of your setup?