Trapdoor

Trapdoor is a door-like block.

Obtaining
Wooden trapdoors can be mined with anything, but an axe is fastest. Iron trapdoors require a pickaxe to mine.

Usage
Wooden trapdoors can be opened and closed by players. Iron doors can only be opened with redstone power.

Trapoors must be "attached" to a block to the side of them. To place a trapdoor, a door item while pointing at the top of the block it should be attached to.

When placed, a trapdoor will either occupy the top or bottom part of a block, depending on where the player placed the trapdoor. If a trapdoor is placed on the top part of a block, it will open downwards. If placed on the bottom part of a block, it will open upwards.

By default a trapdoor's "hinge" will be on the side that the player placed it on, but the hinge can be forced to a different side by aiming it at a different part of a block.

Water and lava will flow around trapdoors. Lava can create fire in air blocks next to wooden trapdoors as if they were flammable, but the trapdoors will not burn up (and can't be burned by other methods either).

Barrier
A trapdoor can be used as a switchable barrier to entity movement. Although primarily used to block movement by mobs and players, a trapdoor 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.

Trapdoors are 0.1875 ($3/16$) blocks thick. The rest of a trapdoor's space can be moved through freely and provides a breathable space if placed underwater.

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

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

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

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

A trapdoor is a redstone mechanism 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.

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

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

Data values
Wooden trapdoors have an ID name of. For iron trapdoors, it is. A trapdoor stores the block face it is on, whether it's on the bottom or top half of a block and whether it's open in its block data. Trapdoors also have block states, which is expected to replace the block data in a future Minecraft version.

Video
Note: the video for wooden trapdoors is out of date.

Trivia

 * Certain mobs, such as sheep, cannot jump onto a block with a trapdoor in the closed position on top. This allows you to make pens that animals can walk into but not out of easily.
 * If you put a trapdoor on a lava block, the lava will disappear and the trapdoor will not be burned. This allows the creation of paths.
 * Trapdoors can be pushed by pistons if there's another block for it to connect to or if the block it is currently connected to is pushed with it.
 * Walking on trapdoors placed on ice makes walking faster, while sprinting on trapdoors on ice makes the player run faster than a minecart.
 * A trapdoor can muffle the sound of weather.
 * If a trapdoor is placed above a ladder in the closed position, you will fall through it and have to open it to get back up.
 * It is possible to jump from a trapdoor placed on the upper part of one block to one placed on the lower part of a block placed two blocks higher. This makes it possible to build a staircase past any block (or void) that a ladder cannot be attached to (such as a fence).
 * In the future, trapdoors might have different variants depending on the wood used to craft it.