Bed

Beds are a block that allows the player to skip to the next dawn. Beds also set your spawn point to the location of the bed. If the bed is destroyed, the spawn point resets.

If your bed is directly in a corner, a mob could likely spawn right beside you and interrupt your sleep. This may be avoided by making a floating bed or placing your bed in the middle of the room.

In SMP, the server will only skip to dawn when all online players are sleeping; otherwise, it shows a first-person view of the player lying down, and a "Leave Bed" button. It will still change the player's spawn point as long as they stay in the bed until the screen stops getting darker (the point when time would normally skip to day, about 5 seconds).

Crafting
''Note: You can use any color of wool. You can even use multiple colors of wool, but the bed will remain red. The only way to change the bed color is to change the texture pack.''

Placement
Beds, unlike typical blocks, take up two blocks of space. Placement requires at least this much space away from the player's facing direction. When placed, the foot will face toward the user. Two or more beds can be placed next to each other, effectively allowing double beds. Like certain other blocks, beds can not be placed on snow or glass, but can be placed on leaves. If you remove the blocks underneath the bed, the bed will not be removed, but will remain floating. The floating bed method allows beds to be placed over each other like with fences, or for beds to be placed on blocks that they cannot be directly placed upon.

Beds cannot be placed underwater. They can be placed in a dry area and then flooded, but they cannot be slept in (unless your head "is in" water).

Beds are 9/16 of a block high, one more pixel than half a block. This prevents you from walking onto the bed from one level below the bed without jumping, but allows you to walk onto other blocks at the bed's level.

Sleep interruption
If a monster can get within two blocks of a sleeping player, including from above and below, it will wake and attack that player, preventing the time transition from occurring. Placing a bed at the side of your shelter allows monsters to spawn in your house.


 * If placed in or near a dungeon, mobs will spawn even if the spawner is deactivated by torches, and the bed is in a safe place.


 * Sleep will be interrupted by mobs even if the mobs cannot physically approach the corner.

Behavior
Beds are used by right clicking the bed during the night. Attempting to use it during the day will result in a "You can only sleep at night." message, which also appears when attempting to use beds underwater. When used, the player is positioned in the bed and their view slowly fades to black. After this transition, the player wakes up at dawn. If the player were to die, the bed last used will serve as the new spawn point. However, if the bed is removed or there isn't a 1x2x1 empty space next to the bed, the message "Your home bed was missing or obstructed." will display and the spawn point will be reset to the default. Compasses never change their orientation, remaining pointed towards the original spawn.



Sleeping only changes the time of day to sunrise; it does not speed up processes which take place over time such as the decay of dropped items, plant growth, and smelting.

Beds placed in the Nether will explode when the player tries to sleep. The bed will drop as a resource, and may be picked up and placed again. It has been suggested that this could be used for mining in the Nether. However, it is not recommended since the explosion may very likely be enough to kill you, even with armor on. Placing a bed in The End and sleeping in it will explode as well, including setting the surrounding area on fire.

Multiplayer
To skip the night, all players on the server must be in bed at the same time. Players can also chat while in bed, and have the option to leave the bed before the skip happens.

If you try to sleep in a bed occupied by another player, you will get the message "This bed is occupied".

If you sleep in a bed it becomes your spawn.

Safe outdoors bed: in case of emergency
If you ever get lost in the woods when it turns dark, you can safely sleep in a bed without building a shelter first. The trick is elevation.

You will need at least 5 dirt, (or wooden planks/cobblestone/etc.) 1 bed; or as described earlier 3 wool and 3 wooden planks and 1 Crafting Table

The empty 3rd block of the 'overhang' is required to wake up safely, and to be able to place the bed.

In case you are not proficient with sneak or putting down blocks while jumping up; alternatively you can make a crude stair using 3 additional blocks but remember to remove the top of the 2 high stack so monsters will not be able to reach you.

In addition, if you place your bed on the ground, you can sleep in it safely as long as you do so before it gets dark enough for hostiles to spawn. If you try it after it's too dark, you will get a "nightmare".

Trivia

 * When walked on, beds makes the sound of the block below.
 * On peaceful mode, a bed can be used out in the open, as no monsters are present to interrupt your sleep.
 * Since you do not need to stand on a bed to use it, beds can be used as one way transportation. Using the bed through a 1x1 hole will transport you to the other side of the 1x1 hole upon waking up.
 * You can't sneak walk off beds, being slightly taller than half-steps.
 * Beds cannot be destroyed by fire.
 * Beds explode in the Nether and the End. This is likely a paradox joke, because there is no day or night cycle in the Nether and the End.
 * If you fall from high enough to take damage, but right click on a bed before you hit the ground, you won't take the fall damage until you leave the bed.
 * This also happens with minecarts.
 * If there is a solid block above a bed, the surface of the bed will become black, much as with slabs.

Sleeping
 * You can still press inventory key after entering a bed to access your inventory and 2x2 crafting slots.
 * Because of this, you can craft while asleep.
 * Sneaking while asleep will show the inside of your characters head. You will see his face from inside his head.
 * You can get pushed off the bed by a mob or another player, this won't alter the sleeping in any way.
 * You can interact with other objects when in the bed besides the bed itself, such as chests, furnaces.
 * If you right-click food while in a bed, and given that your food bar is not full, you can eat in bed.
 * When going to sleep, you can 'mine' the bed, and therefore escape sleeping if you did want to do so. But this comes at a cost, as there is a glitch. When you bump into walls of blocks, you will get hurt, but may regenerate health. This allows the player to fight Mobs endlessly. In Minecraft 1.8.1, you will not regenerate health without a near-full food bar, just like normal. With this glitch, though, you will be able to walk through water without it affecting you as it normally would. You can jump while in the water, and cannot swim. This glitch will remain until you die or go to sleep again.
 * If you right-click while lying in a bed, with the mouse in a certain position, the "This bed is occupied" message will appear.

SMP
 * In SMP, you can view other players in bed. The player avatar clips just slightly into the bed if they have something in their hand and his feet protrude off the edge.
 * In Beta 1.4, the player could only set the spawn by pressing the Leave Bed button in SMP. This was fixed in 1.4_01.
 * Placing a bed next to cactus in SMP creates a detached headrest. This can be used to create heart shaped beds and benches.

Bugs

 * If you try to use a bed with an ender pearl in your hand, you will receive the "This bed is occupied" message
 * If you try to place a bed above the height limit for the map, it will be lost from your inventory.
 * Hitting the bed will cause the top surface to brighten. This does not affect the light level, and it is probably a glitch in the breaking animation.
 * Many situations cause a “You can only sleep at night.” message, even if it is nighttime. These have been reported to include:
 * The bed being surrounded on all sides by blocks, or water.
 * Right-clicking on the foot instead of the head of the bed.
 * Right-clicking the bed while standing on top of it or more than three blocks away.
 * The bed seems to only force the camera to be in the bed; while the screen is fading out, you can still move around, break/place blocks, fire arrows, etc., but cannot see where you are or see your arm/tool. This has been called “sleepwalking.”
 * Moving the mouse around will cause particles on the screen to face different directions. This is because they are sprites, images that attempt to face the player's eyes (which aren't actually at that location) to avoid being seen edge-on.
 * In multiplayer, many situations can cause you to be kicked from the server for an “Illegal stance”:
 * Going to bed while sneaking.
 * Going to bed right between sunrise and day.
 * Being pushed off the bed into a block. (This will sometimes kick the pusher as well.)
 * There is a glitch in SMP where, if you switch from two beds rapidly (possibly due to connection), you can enter one bed and leave to appear near a different bed.
 * Using a bed in a room with a low ceiling can result in the player waking up with their head stuck, causing them to suffocate unless they can escape, which is likely after sneaking while using a bed.
 * In SMP, if a player gets into a bed and then another player surrounds the bed with a solid material (e.g. cobblestone), the first player will be stuck in a laying down position upon attempting to get out of the bed.
 * Saving in a bed and then continuing that saved game causes the player to fall through the floor and makes the bed "occupied." This can be fixed by destroying and then replacing the bed.
 * Sometimes if you place a bed next to a wall, it will spawn you on the other side of the wall.
 * Beds can be used to sleep through thunderstorms even during the day. It's possible that the condition that must be met in order to sleep is not that it is nighttime, but that the ambient light is below a certain threshold.
 * If you sleep with the door open, your house will be unsafe and mobs will always spawn unless you destroy and replace the door.
 * If the bed is clicked on while holding a bow with arrows in your inventory, you will fall asleep and as if an invisible copy of the player is standing where you were, arrows will fire from that spot, fall through the bed and be lost forever. The arrows will not damage you.
 * If you walk very far away from your bed and then die, you do not re-spawn at your bed and instead spawn at your original spawn point, receiving the message "Your home bed was missing or obstructed".
 * If a hostile mob can get within 2 blocks of the bed, even if the blocks are separated by a wall, you will be awakened with either a skeleton or a zombie standing next to you. There appears to be a slight delay before the mob attacks you, giving you time to get the first blow.
 * Sometimes when sleeping in a bed completely surrounded by torches (including corners) you will have fallen through the bed when you wake up and begin to suffocate.
 * If you use your bed, and have a door with a right hinge (as viewed from the outside), monsters can still get to you and wake you up, as though no door was present. One example of this is a room with double doors, at least one of the doors will be unsafe. This can be avoided by leaving the door open, rather than closed, when sleeping. A second solution is to place the door on the "inside" of the "frame."
 * When sleeping in a bed, if you look down (it won't adjust the looking angle though) and destroy the bed while sleeping in it, you will hurt your self for 1/2 of a heart. No damage will be inflicted if you are playing in peaceful mode. In addition, if you are next to a 2 or more block high wall when this happened, you will be able to walk into it to a certain extent, just enough to suffocate you. if you are in 3rd person, you will switch to first person automatically when walking into the wall. This also cancels the sleeping animation, making it still night time.
 * You cannot respawn back to a bed surrounded by half-height blocks ("Your home bed was missing or obstructed")
 * If you place a bed on a glass floor (through placing the bed on normal blocks and then replacing the normal blocks for glass blocks) then when you die you will be placed back at your spawn point with the message that says "Your home bed was missing or obstructed."
 * In 1.8 beds don't always skip to the next morning, you can get in them at night but when you wake up it is still night.
 * In 1.8, you can fly whilst sleeping in creative mode. Video Example
 * If there is block of air between a bed and a big chest above it, and you try to go to sleep, you appear to be pushed out of bed, then sleep on the floor next to you.
 * In SSP, you can interact with the environment when in bed.
 * This includes placing/breaking blocks and using chests, crafting tables, and furnaces.
 * Trying to use the same bed again will cause the "This bed is occupied" message to appear.
 * If you destroy your bed before you finish the sleep animation, you will stand up but whenever you jump you will take damage and walking into ladders will suffocate you this can be fixed by placing your bed again and sleeping or by exiting the game and rejoining
 * In SMP, if you sleep in a bed to set your spawn point but then break the bed and die, there is a chance you will not go to the original spawn, but rather a new spawn point will be created far from the original. There is no way to reset the spawn back to the original point without mods. (From some testing, it seems that the spawn point is reset to (0,Y,0).)
 * While using the "Quake Pro" FOV level, you can see the inside of your head while sleeping.