Updated info about determining player's position on wake up and respawn
mNo edit summary |
Cobybluesky (talk | contribs) (Updated info about determining player's position on wake up and respawn) |
||
Line 300:
Beds displaying an error above the hotbar is a feature exclusive to beds; other blocks that cannot be used do not display such a message.<ref>{{bug|MC-160479}} resolved as "Works As Intended"</ref>
The process for determining where to put the player after waking up is the same as for determining where to respawn the player after death (see below). The player always wakes up facing the head of the bed.
Villagers always wake up on top of the bed, meaning they can suffocate if there isn't enough room above the bed.
==== Passing the night ====
Sleeping changes the [[Daylight cycle|time of day]] to sunrise and resets the [[weather]] cycle, changing the weather to clear conditions. {{IN|Java}}, the weather cycle resets only during rainy or snowy weather. The player
Sleeping does not accelerate processes that take place over time such as the growth of [[crops]] or [[smelting]]. If {{cmd|gamerule doDaylightCycle}} is <code>false</code>, the player instead wakes up in the night.
Line 326:
The check for a bed is made only when the player respawns. This means that the bed can be destroyed and replaced or even reoriented, but as long as there is a bed present in the same location, the player can respawn there. If a player's bed is absent, or if the area around the bed is made unsuitable for respawning (see below), a message is displayed saying "You have no home bed or respawn anchor, or it was obstructed" {{in|Java}} or "Your home bed was missing or obstructed" {{in|Bedrock}}, and the player respawns at the [[world spawn]] point.
When choosing where to respawn the player, the two blocks to the immediate left and right of the head of the bed are considered first. Which block is chosen between the two corresponds to which direction the player was facing when they last interacted with the bed to set their spawn point; For example, a bed facing west will respawn the player on the south side of the bed if they are facing towards the north while setting their spawn point, and vice versa. If the player is perfectly aligned with the bed when the spawn point is set, the right side of the bed takes priority. Interacting with the bed again will still update which side of the bed is chosen for respawning, even if the location of the spawn point itself does not change.
Once a side is chosen, if the block immediately on the chosen side of the head of the bed is obstructed, the next block to be checked is chosen moving in a clockwise (right side) or counterclockwise (left side) direction around the bed. If all of the 10 blocks immediately adjacent to the bed are obstructed, the block above the head of the bed is checked, followed by the block above the foot of the bed. The player is always respawned facing the head of the bed, the same as for waking up.
For a location to be unobstructed, the block at the level of the bed must be air or non-solid (e.g. torches, but not glass) and there must be a space with a solid block below it and two non-colliding blocks for the player to stand in 0-2 blocks below the bed. It does not matter if the bed itself has blocks above it. Putting a slab one block above a bed can act as a two block tall space, as the bed is half a block tall. The bed never spawns the player on or directly below itself even if all other locations are obstructed. If a bed is obstructed, the player's spawn point is cleared after they respawn. That is, even if the bed is subsequently made usable again, the player continues to respawn at the world spawn until interacting with the bed again.
|