Beds

The Bed allows a player to set a new Spawn point. Once a bed has been placed, it must be right-clicked to activate. Several criteria must be met for the room where the bed is placed in order for the spawn point to set. If the criteria have been met successfully, right-clicking the bed will cause a message to be displayed in the bottom-left corner of the screen: "Spawn point set!".

If the bed is removed, or if the criteria for the bed to function properly are no longer met, your spawn point will revert to the world default. If the bed is removed and replaced in the same location it will still act as the spawn point as long as it still meets the criteria mentioned.

Criteria
For a bed to function properly and allow you to set your spawn point, the following criteria must be met: If the requirements are met, right clicking the bed should set your spawn and show the message "Spawn point set!".
 * The bed must have enough space. The room doesn't have to be any specific shape but the area of the room (including the walls, ceiling and floor) must equal 60 tiles or more.
 * Enemies must not be able to spawn in the room; The room must have player-placed walls behind it. Holes in the background wall must be no larger than 4 tiles wide or 4 high. (For example, a room that is 9 wide and 4 high split with a background wall down the center is usable as a bedroom).
 * The room's exterior walls may be crafted from dirt.
 * The background walls can not be a naturally-occurring wall. This includes dirt, mud and the background walls in Chasms and the Dungeon.
 * Player-placed dirt walls will work.
 * Wood platforms can be used as the room's floor or ceiling.
 * A bed may be placed in a non-rectangular room, so long as the blocks immediately above it are left clear.
 * It can be placed underground, so long as the other conditions are met.