Activator Rail

An activator rail is a type of rail that can "activate" certain minecarts.

Placement
An activator rail can be used as a rail and as a redstone component.

To place an activator rail, an activator rail item while pointing at a surface facing the space the activator rail should occupy. An activator rail can be placed on:
 * the top of any full solid opaque block (stone, dirt, blocks of gold, etc.), including full-block mechanism components (command blocks, dispensers, droppers, note blocks, and redstone lamps)
 * the top of a hopper, upside-down slab, or upside-down stairs.

An activator rail cannot be attached to the side or bottom of any block, but attempting to make such an attachment may cause the activator rail to attach to the top of a block under the destination space. For example, if a fence is on the ground, attempting to attach an activator rail to the side of the fence causes the activator rail to be attached to the top of the ground next to the fence instead.

When placed, an activator rail configures itself to line up with any adjacent rails (including detector rails, powered rails, and other activator rails), as well as adjacent rails one block up. The behaviors $$ diverge in the following ways.

$$:


 * If there are two adjacent rails on non-opposite sides, or three or more adjacent rails, or no adjacent rails at all, an activator rail aligns itself in the direction the player is facing. If an existing activator rail is connected to only one other rail or none at all, and a new rail is placed perpendicular to the activator rail, then the activator rail aligns itself in the east-west direction (if it isn't already facing that way). If a rail it would align with is one block up, an activator rail slants upward toward it (with multiple options to slant upward to, an activator rail "prefers" west or south). Other configurations can be created by placing and removing various rails.

$$:


 * If there are two adjacent rails on non-opposite sides, or three or more adjacent rails, an activator rail aligns itself in the east-west direction. If there are no adjacent rails, an activator rail aligns itself in the north-south direction (but if a rail is later placed to the east or west, the activator rail re-orients itself in the east-west direction even if it is already connected to another rail to the north or south). If a rail it would align with is one block up, an activator rail slants upward toward it (with multiple options to slant upward to, an activator rail "prefers", in order: west, east, south, and north). Other configurations can be created by placing and removing various rails.

It cannot be placed suspended in midair, even with commands, which is not unintentional.

Breaking
Activator rails can be crafted and previously-placed activator rails can be broken with bare hands or any tool, dropping themselves as items.

An activator rail can be broken with any tool, dropping itself as an item, but a pickaxe is fastest. To break an activator rail, it:

An activator rail also drops as an item when the block beneath it is removed, water or lava flows over it, or a piston moves it into a space with no floor below it.

Rail
Activator rails (and other rails) can be used as "roads" for minecarts. A minecart that enters an activator rail's space from either end of the activator rail continues to move, losing only a little velocity (which can then be increased again with powered rails). A minecart that enters an activator rail's space from the side turns east or south (depending on the activator rail's orientation), or in the downward direction for a slanted activator rail.

Redstone component
Activator rails can be used to affect minecarts that travel over them.


 * Activation


 * An activator rail is a redstone mechanism and can be activated by:
 * an adjacent active power component (for example, a redstone torch, a block of redstone, a daylight sensor, etc.)
 * an adjacent powered block (strongly-powered or weakly-powered)
 * a powered redstone comparator or redstone repeater facing the activator rail
 * powered redstone dust configured to point at the activator rail, or a directionless "dot" next to it,‌[Java Edition only][until JE 1.16] or a plus sign‌[Bedrock Edition only]‌[upcoming: JE 1.16]; an activator rail is not activated by adjacent powered redstone dust that is configured to point in another direction.


 * An activated activator rail also activates any adjacent activator rails it is connected to, up to eight away from the original activation source. Thus a single activation source can activate up to 17 rails (one original in the middle and eight on either side). An activated activator rail does not activate adjacent rails not connected to it.


 * Behavior

An activator rail affects minecarts above it with varying effects that occur as soon as any part of the minecart is on the activator rail.

An active activator rail:
 * ejects mobs (including players) from minecarts as if a player had used the control to exit the minecart (by default, one block to the right of the direction the minecart is moving and up to two blocks up, unless blocked)
 * repeatedly activates command block minecarts — a command block minecart executes its command every four game ticks until the command block minecart is no longer on the activator rail
 * disables hopper minecarts — a disabled hopper minecart cannot pick up items it travels through until it is enabled by an inactive activator rail (or until it is broken and re-placed)
 * primes TNT minecarts — primed TNT minecarts explode after four seconds with an explosive power proportional to their speed over the activator rail.

An inactive activator rail enables hopper minecarts — an enabled hopper minecart picks up items it travels through until it is disabled by an active activator rail.

ID




Block data
$$, an activator rail's block data stores its orientation and activation status: