House

A house is a structure that meets the following criteria:
 * Has side and back walls, a floor, and a roof. The back walls must be uniform, as two different wall types leave a small slot of air. You can cover this slot with blocks to allow for settlement, but otherwise NPCs won't make it their home.
 * Has a table and a chair.
 * Has a door in a wall or a 2 block wide platform in the ceiling or floor.
 * Has a light source.
 * Is at least 7 blocks wide and 5 blocks tall, not including walls, floor or ceiling.

For setting the player spawn point by using a bed, the size, and back wall requirements must be met.

An NPC requires a house to spawn. For an NPC to move in, the house must also be unoccupied.