Door

A door is a block that can be used as a switchable barrier.

Obtaining
Doors can be obtained by crafting, and can be found in villages, strongholds and woodland mansions.

Breaking
To break a door, it. An iron door removed by hand will drop itself as an item.

A door will also be removed and drop itself as an item:
 * if the block beneath the door is moved, removed, or destroyed
 * if a piston tries to push the door (trying to pull a door does nothing) or moves a block into its space

Natural generation
Oak, acacia and spruce wood doors are generated on buildings in villages, forming the entrances to the majority of buildings. The doors used in the village depends on what biome the village generated in.

Oak wood doors and iron doors generate naturally in strongholds, with the latter having a stone button to open. Dark oak wood doors and iron doors generate in woodland mansions.

Various Wooden Doors generate naturally in shipwrecks

Usage
Wood doors can be opened and closed by players and villagers, and can be broken by zombies in Hard difficulty. Iron doors can be opened only with redstone power.


 * Placement

Doors must be "attached" to a block beneath them. To place a door, a door item while pointing at the top of the block it should be attached to. A door can be attached to:
 * the top of any full solid opaque block (stone, dirt, blocks of gold, etc.)
 * the top of an upside-down slab or upside-down stairs
 * the top of a slime block, hopper, or downward-facing piston

When placed, a door will occupy the side of the block towards the placing player's back — if a player places a door in front of them, the door will occupy the side of the block closest to them (and open away from them); if a player places a door in their own space, the door will end up behind the player (and open through them).

By default a door's "hinge" will be on the side of the half of the block that the player pointed at when placing and its "handle" on the opposite side, but the hinge will be forced to other side by:
 * placing a door besides another door (creating a double door where both doors open away from each other)
 * placing a door between a full solid and any opaque block (top or bottom), making the hinge appear to attach to the solid block.

Behavior
Water and lava will flow around doors. Lava can create fire in air blocks next to wood doors as if the wood doors were flammable, but the doors will not burn up (and can't be burned by other methods either, except throwing them into lava).

Doors do not prevent mobs from spawning on their coordinates.

The sound of opening and closing of a door can be heard up to 16 blocks away, like most mob sounds.

When placed using the command, only one half of a door will be placed, since doors are actually two separate blocks. The lower half will still work, but with graphical bugs, and the upper half will not. Redstone cannot be used because it updates the half, breaking it. The upper half will not drop anything when broken, the lower half will drop a normal door. This implies that the upper half is dependent on the lower.

Barrier
A door can be used as a switchable barrier to entity movement. Although primarily used to block movement by mobs and players, a door can also be used to control the movement of boats (for example, a door placed in a two-wide water flow will stop a boat when perpendicular to the flow, but allow it to move again when parallel), items and minecarts (a door can stop a falling item or minecart, then allow it to drop again when the door moves), etc.

Doors are 0.1875 ($3/16$) blocks thick. The rest of a door's space can be moved through freely and provides a breathable space if placed underwater. A door occupies two block spaces and both halves normally act as a single barrier, but if a player is occupying the space a door moves to, the player can jump up to land on the bottom half of the door and then again to land on top of the door.

To open or close a wooden door, use the control. When a door opens or closes, it immediately changes its orientation without affecting anything in the space it "swings through". Moving doors don't push entities the way that pistons do.

Villagers can open and close wooden doors, but only do so with doors they consider part of their village (including player-placed doors within range).

Some zombies can break wooden doors in Hard difficulty, but only do so to reach targeted players or villagers. Zombies have only a 5% chance to spawn with the ability to break doors, and will only attempt to break wooden doors which are in their "closed" state, even if a door is placed so that its "open" state blocks access (for example, by facing sideways when placing a door so that it allows passage when closed and blocks passage when open).

Iron doors can only be opened with redstone power (a button, a redstone circuit, etc.). Villagers and zombies cannot affect an iron door except by stepping on a pressure plate or by triggering a tripwire.

Redstone component
Both wood and iron doors can be controlled with redstone power.

A door is a redstone mechanism component and can be activated by:
 * an adjacent active power component, including above or below: for example, a redstone torch, a block of redstone, a daylight sensor, etc.
 * an adjacent powered block (for example, a block with an active redstone torch under it), including above or below
 * a powered redstone comparator or redstone repeater facing the door
 * powered redstone dust configured to point at the door or a directionless "dot" next to it; a door is not activated by adjacent powered redstone dust which is configured to point in another direction.

All methods of activating a door can be applied to either the top or bottom parts of a door.

When activated, a door will immediately "rotate" around its hinge side to its open state. When deactivated, a door immediately returns to its closed state.

An activated wood door can still be closed by a player or villager, and won't re-open until it receives a new activation signal (if a door has been closed "by hand", it still needs to be deactivated and then reactivated to open by redstone).

Fuel
Wooden doors can be used as a fuel in furnaces, smelting 1 item per door.

Data values
A door's type is defined by its ID name, and its orientation and status are stored in the block data of its top and bottom halves. A door also has a block state which is expected to replace the functionality of block data in a future version.

ID
A door's ID defines what type of door it is.

Block data
A door specifies its hinge side in the block data of its upper block, and its facing and opened status in the block data of its lower block.

Trivia

 * Iron doors have a scar where the handle would be, as they are merely a resprited oak door.
 * If the player stands inside the door's hitbox, you can jump twice to get on top of the door.

Bedrock Edition

 * Standing in the center of a door will mean that you can punch blocks on the other side of the door without any interference.
 * Doors actually have durability bars that deplete when using the doors as tools. It is unconfirmed if this is a bug or a feature.
 * Players standing inside the visible, solid part of a door cannot see the door.