Skip to content

Beds

A client tries to sleep in a bed

PacketContents
C->S Place BlockClient interacts with the bed block
S->C Interact With BlockThe server makes the player sleep in the bed

Another client observes a player getting into bed

PacketContents
S->C AnimationOther client interacts with the bed block (1: Swing Arm)
S->C Interact With BlockThe server makes the player sleep in the bed

A player clicks "Leave Bed"

PacketContents
C->S Player ActionPlayer Action value of 1 is sent (Stop Sleeping)
S->C AnimationThe server makes the player leave the bed (3 Stop Sleeping)

Another player observes a player getting out of bed

PacketContents
S->C AnimationThe server makes the player leave the bed (3 Stop Sleeping)

WARNING

It appears setting the player animation to 3 causes the infamous issue where players can walk under water. This remains for as long as the client remains connected. Possibly the animation needs to be reset to 0 soon after?