Door

A door is a block that can be used as a barrier that can be opened by hand or with redstone.

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

Breaking
Wooden doors can be broken with anything, but axes are the fastest. A pickaxe is effective on an iron door.

A door is removed and drops 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
Doors generate in some generated structures, forming the entrances to the majority of buildings.
 * Oak doors generate in plains villages.
 * Jungle doors generate in desert villages.
 * Acacia doors generate in savanna villages.
 * Spruce doors generate in snowy tundra, taiga, and snowy taiga villages.
 * Dark oak doors generate in master bedroom closets in woodland mansions
 * Iron doors generate in prison rooms in woodland mansions. $$, iron doors generate in strongholds with a stone button to open.
 * Various wooden doors generate naturally in shipwrecks.

Usage
Wooden doors can be opened and closed by players villagers, wandering traders, evokers, and vindicators. Wooden doors can be broken by zombies(including zombie pigman but excluding drowned) in Hard difficulty, and vindicators in Normal and 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

More information about placement on transparent blocks can be found at Opacity/Placement.

When placed, a door occupies the side of the block facing the player, or behind a player if placed in the player's own space.

By default, a door's "hinge" appears 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 is 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 flows around doors. Lava can create fire in air blocks next to wood doors as if the wood doors were flammable, but the doors do not burn (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 is placed, because doors are actually two separate blocks. The lower half still works, but with graphical bugs, and the upper half does not. Redstone cannot be used because it updates the half, breaking it. The upper half does not drop anything when broken, the lower half drops 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 stops 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 provide a breathable space if placed underwater. $$, doors in water source blocks are waterlogged and do not displace water source blocks.

Doors are 0.1875 ($3/16$) blocks thick. The rest of a door's space can be moved through freely. A door occupies two block spaces and both halves normally act as a single barrier, although doors can be opened or closed with a player or mob occupying the bottom block of the door, in which case 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, wandering traders, evokers, and vindicators can open and close wooden doors when pathfinding.

Some zombies can break wooden doors in Hard difficulty. Zombies have a 5% chance to spawn with the ability to break doors. Vindicators spawned from a raid in Normal and Hard difficulty can also break wooden doors, but they do so only to reach targeted players, villagers, or wandering traders. Some vindicators sometimes open wooden door instead of break it. Both zombies and vindicators attempt to break wooden doors only when 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 be opened only with redstone power (a button, a redstone circuit, etc.). Villagers, wandering traders, evokers, vindicators, and zombies can activate an iron door 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 that 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 immediately rotates 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 that 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
In Bedrock Edition, 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. They also use an element from the old Block of Iron.
 * The tops of doors do not rotate in an expected way when opened and closed.
 * $$, a player standing in the center of a door can punch blocks on the other side of the door without any interference.