Trapdoor

"Trapdoors have been in Minecraft since Beta 1.6 in 2011, when they were added alongside maps, grass and dead bushes. Originally they only opened upward, but that was later fixed so they opened down too, and the ability to climb them as a ladder was added. A bunch of different types of trapdoor have been added in the last few years - one for each type of wood, and also one made of iron that can only be opened with redstone power."

- Duncan Geere

A trapdoor is a solid, transparent block that can be used as an openable barrier.

Obtaining
Wooden trapdoors can be mined with anything, but an axe is fastest. Iron trapdoors require a pickaxe to mine. Trapdoors remain in place if their attachment block is moved, removed, or destroyed.

Natural generation
An oak trapdoor may be found leading to igloo basements. Various wooden trapdoors (except acacia trapdoor) generate on a shipwreck.

Oak trapdoors generate naturally in plains villages.

Spruce trapdoors generate naturally in taiga and snowy taiga villages.

Jungle trapdoors generate naturally around composters in desert villages.

Properties
Wooden trapdoors can be opened and closed by players or redstone pulse. Iron trapdoors can be opened only by redstone pulse.

To place a trapdoor, a trapdoor item while pointing at the block it should be attached to. Once it is placed, the attachment block can be removed without breaking the trapdoor.

When placed, a trapdoor either occupies 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 opens downwards. If placed on the bottom part of a block, it opens upwards.

A trapdoor's "hinge" is located on the block attached to it.

Trapdoors can be moved by pistons. Trapdoors block flowing water and lava. Waterlogged trapdoors release water from all sides apart from the top or all sides apart from the side that is blocked by the trapdoor itself (and the top) Lava can create fire in air blocks next to wooden trapdoors as if they were flammable, but the trapdoors do not burn (and cannot be burned by other methods either).

An open trapdoor may be climbed like a ladder if it is directly above a ladder and on the same side of the block.

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

Trapdoors can be opened or closed with a player or mob inside.

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 top trapdoor placed in a two-wide water flow stops a boat when closed (extended out into the water flow), but allow it to move again when open), items and minecarts (a trapdoor can stop a falling item or minecart, then allow it to drop again when the trapdoor opens), 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 and not waterlogged.

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.).

Mobs pathfinding considers trapdoors to always be closed, whether they are open or not. This often result in mobs falling through open trapdoors.

Redstone component
Both wooden 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 trapdoor
 * powered redstone dust configured to point at the trapdoor or a directionless "dot" next to it; a trapdoor is not activated by adjacent powered redstone dust which is configured to point in another direction.

When activated, a trapdoor immediately rotates around its hinge side to its open state. When deactivated, a trapdoor immediately returns to its closed state. Each change of state takes one game tick.

An activated wooden trapdoor can still be closed by a player, 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).

Fuel
Wooden trapdoors can be used as a fuel in furnaces, smelting 1.5 items per block.

Block data
In Bedrock Edition, a trapdoor's block data specifies its orientation, positioning, and activation status: