[MC-3599] Sleeping in beds above layer 128 in multiplayer causes the player to fall into the void (visually only) Created: 21/Nov/12  Updated: 01/Mar/14  Resolved: 01/Mar/14

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.5, Minecraft 1.4.6, Snapshot 13w04a, Snapshot 13w05b, Snapshot 13w06a, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.5.1, Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 13w36b, Minecraft 1.7.1, Minecraft 1.7.2, Minecraft 13w48a, Minecraft 13w48b, Minecraft 13w49a, Minecraft 1.7.3, Minecraft 1.7.4
Fix Version/s: Minecraft 14w08a

Type: Bug
Reporter: Apeiron Assignee: Unassigned
Resolution: Fixed Votes: 16
Labels: None

Attachments: PNG File 2012-12-07_23.10.34.png     PNG File 2014-03-01_12.06.14.png     PNG File ss.png    
Issue Links:
Duplicate
is duplicated by MC-5918 Bed glitch Resolved
is duplicated by MC-10032 Falling out of the bed Resolved
is duplicated by MC-14294 Bed and player placing Resolved
is duplicated by MC-14473 Multiplayer: At 128Y+ Bed view shows ... Resolved
is duplicated by MC-41263 When sleeping in a bed on a server at... Resolved
CHK:
Confirmation Status: Confirmed

 Description   

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.



 Comments   
Comment by Jonathan Haas [ 01/Mar/14 ]

I can confirm it's fixes in 14w08a

Comment by Itouch2 [ 01/Mar/14 ]

Affects 1.7.5, Fixed in 08a

Comment by Chris Andrews [ 16/Dec/13 ]

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.

Comment by Jesper the End [ 09/Sep/13 ]

still in 13w36b

Comment by Jeuv [ 09/Sep/13 ]

still in 1.6.2

Comment by Darren Kalck [ 08/Feb/13 ]

Still in 13w06a.

Comment by Jesper the End [ 01/Feb/13 ]

also for 13w05b? I can't test it right now.

Comment by Darren Kalck [ 01/Feb/13 ]

I still have this bug with 13w05a

Comment by jelle wietsma [ 28/Jan/13 ]

confirmed for 13w04a only above 128

Comment by Jesper the End [ 28/Jan/13 ]

confirmed for 13w04a SMP (not open to lan) and only above 128

Comment by Apeiron [ 08/Dec/12 ]

Ahh. My nights never had it drop below ~-350. So it must be server-side after all, if damage is being applied.

Comment by Kumasasa [ 07/Dec/12 ]

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.

Comment by Apeiron [ 07/Dec/12 ]

I've never received damage in the morning from this bug. What is your test environment?

Comment by Kumasasa [ 04/Dec/12 ]

Can confirm for SMP.

The screen doesn't fade out, it instantly blackens.
When leaving the bed in the morning the player gets damage.

Comment by Apeiron [ 25/Nov/12 ]

After a little further testing, it doesn't appear to affect single-player. Added a screenshot as requested.

Comment by [Mod] CubeTheThird [ 25/Nov/12 ]

Unable to reproduce. Can you attach a screenshot of your setup?

Generated at Sun Jan 12 12:01:46 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.