Bed

A bed is a block that allows a player to sleep and to reset their spawn point to within a few blocks of the bed.

Obtaining
Beds can be mined with any tool, or without a tool.

A bed will also drop itself as an item when pushed by a piston.

Natural generation
One bed naturally generates in an igloo. The bed is red/white if generated in ice plains and brown if generated in a cold taiga.

Usage
Beds are 9/16th of a block high, one more pixel than half a block, so it allows the player to walk up onto other blocks while on top of the bed, but not to walk onto the bed from a level below.

Placement
Beds take up two blocks of space. Placement requires at least 2 blocks from the player's facing direction. When placed, the foot will be placed on the block selected and will face away from the player. Like certain other blocks, beds cannot be placed on non-solid blocks. The bed will remain in place if its supporting blocks are removed.

Explosions
Beds placed in the Nether or the End will explode when the player tries to sleep, and set fire to surrounding blocks. The explosion has power 5, which is stronger than TNT (4), but not as strong as a charged creeper or ender crystal (6).

Sleeping


Beds are used by pressing the button while looking at the bed.

It must be nighttime – between 12541 and 23458 ticks inclusive, to be exact. Beds can also be used regardless of time during a thunderstorm. Attempting to use a bed at any other time will result in the message You can only sleep at night.

The player must be close to the bed. If the player is close enough to click on the bed, but not close enough to sleep in it, the message You may not rest now, the bed is too far away will be displayed.

The player cannot sleep if a "monster" is within 8 blocks of the bed horizontally (along each axis) and 5 blocks vertically. If a monster is nearby, even through a wall, the message You may not rest now, there are monsters nearby will be displayed and the player will not be able to sleep until the monsters leave or are killed. "Monsters" include the majority of hostile mobs, except killer rabbits, slimes, magma cubes, ghasts, shulkers and ender dragons. It also includes endermen, zombie pigmen (only aggravated zombie pigmen will prevent sleeping in ) and spiders, which are neutral mobs.

The player also cannot sleep in a bed occupied by another player, which will result in the message, This bed is occupied.

The player also cannot sleep while on fire.

If all sleeping requirements are met and the player enters a bed, the player will be positioned in the bed, in multiplayer the player will be seen above the sheets, and the screen will slowly fade to black. In Pocket Edition the sleeping animation will slowly lower the player into bed.

During this time, the chat window is focused, and the player can leave the bed by clicking the Leave Bed button.

Passing the night
Pressing the Leave Bed button changes the time of day to sunrise, and resets the weather to clear weather. It does not speed up processes which take place over time such as the growth of crops or smelting.

To skip the night in multiplayer, all players in the Overworld must be in bed at the same time. Pressing the Leave Bed button is not necessary in this case.

If the bed is destroyed while the player is in it, by for example an explosion or by another player, it will cause the player to wake up prematurely, and the night will not pass.

Setting the spawn point
Once a player has entered a bed, their spawn point is set to the location of that bed.

The bed is in no way tied to a player's spawn point - the game only checks for the presence of a bed at a player's spawn point when the respawn button is clicked from the death screen. The bed may be destroyed, replaced, reoriented, etc. and will still serve as a spawn point for players so long as it exists when the player tries to respawn. If a player's bed is destroyed, or if the area around the bed is made unsuitable for respawning, a message is displayed saying Your home bed was missing or obstructed, and the player will respawn at the world spawn point.

For a bed to be usable as a spawn point, the player must be able to stand next to the bed at the same level as it. There must be a solid block at the same 'floor' level as the bed, with 2 transparent blocks of space (for example, air) for the player to stand in, in one of the ten blocks that surround the bed. It doesn't matter if the bed itself has blocks above it.

Bouncing
Falling onto a bed will bounce the player with 66% strength – the bouncing-up velocity will be 66% of the impact velocity. The player will also take only 50% of normal fall damage.

If the player is falling, but clicks on the bed before hitting the ground, the fall damage will be delayed until the player wakes up.

Trivia

 * If the world is quit while sleeping, upon return the player will be awake beside the bed.
 * The player's avatar clips just slightly into the bed if they have something in their hand and their feet protrude off the edge.
 * Using the command while another player is sleeping will still teleport the sleeping player.
 * If you place a bed on ice, running over the bed acts like running over ice, similar to slabs.
 * If you sleep when the is turned off, you will fall asleep, but wake up at night.
 * Using all 6 wood and all 16 wool combinations, there are 884,736 different ways to craft a bed.
 * With colored beds, there are 3,456 combinations.
 * When placed using the command, only one half of a bed will be placed, since beds are two blocks wide. A single half can be slept in like a whole bed.