Minecraft Wiki
Advertisement
This article is about the detector rail. For other types of rails, see Rail (disambiguation).

A detector rail is a type of rail that produces a redstone signal when a minecart is on it.

Obtaining[]

Breaking[]

A detector rail can be broken fairly easily by hand, dropping itself as an item. It can be broken faster by using a pickaxe.

Block Detector Rail
Hardness 0.7
Tool
Breaking time[A]
Default 1.05
Wooden 0.55
Stone 0.3
Iron 0.2
Diamond 0.15
Netherite 0.15
Golden 0.1
  1. Times are for unenchanted tools as wielded by players with no status effects, measured in seconds. For more information, see Breaking § Speed.

A detector rail also drops as an item if:

  • the block beneath it is removed
  • water or lava flows over it‌[Java Edition only]
  • a piston moves it into a space with no floor below it.

Chest loot[]

Item Structure Container Quantity Chance
Java Edition
Detector Rail Mineshaft Chest 1–4 27.1%
Bedrock Edition
Detector Rail Mineshaft Chest 1–4 27.1%

Crafting[]

Ingredients Crafting recipe
Iron Ingot +
Stone Pressure Plate +
Redstone Dust

6

Usage[]

A detector rail can be used as a rail that can detect when minecarts are on it or how full container minecarts on it are.

To place a detector rail, use the Place Block control on the face of a block adjacent to the destination space.

A detector rail can be attached to:

A detector rail cannot be attached to the side or bottom of any block, but attempting to make such an attachment may cause the detector 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 a detector rail to the side of the fence causes the detector rail to be attached to the top of the ground next to the fence instead.

If updated while on an opened trapdoor, a detector rail (or other rails) breaks drops as an item. Placing a minecart on a detector rail on top of a closed and unpowered trapdoor opens the trapdoor and updates it, causing the detector rail to break. If the trapdoor is powered while the minecart is placed, the trapdoor does not open and the rail does not break. The minecart on the detector rail powers the trapdoor and keeps it closed even if the external power source is removed, allowing the detector rail to stay on.

When placed, a detector rail configures itself to line up with any adjacent rails (including activator rails, powered rails, and other detector rails), as well as adjacent rails one block up. If there are two adjacent rails on non-opposite sides, or three or more adjacent rails, a detector rail lines up in the east-west direction. If there are no adjacent rails, a detector rail lines up in the north-south direction (but if a rail is later placed to the east or west, the detector 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 line up with is one block up, a detector rail slants upward toward it (with multiple options to slant upward to, a detector rail "prefers", in order: west, east, south, and north). Other configurations can be created by placing and removing various rails.

Mobs avoid walking across a detector rail (or other rails), but can be pushed onto them.

It cannot be placed suspended in midair, even with commands.[1]

Rail[]

Main article: Rail

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

Redstone component[]

Comparitor signal strength minecart

Example for signal strength of a full minecart (right) and a half-full one (left)

See also: Redstone circuit

A detector rail activates when any minecart is on it (even if only a portion of the minecart is on it), and deactivates when no minecarts are on it. The duration of the signal is always a multiple of 10 redstone ticks (although lag or unloading/reloading a chunk might affect this). While active, a detector rail:

Detector-comparator-diff

Comparators give a signal for a minecart with chest or a minecart with hopper

If the minecart on the detector rail is a minecart with chest or minecart with hopper, an adjacent redstone comparator facing away from the detector rail outputs a power level proportional to the container's fullness, possibly power level 0. For any other type of minecart (including a regular minecart with a mob riding it) the comparator's output is zero.

A comparator can read the contents of a minecart with hopper or with chest on a detector rail through a solid opaque block, as it can with other container blocks.

Sounds[]

Java Edition:

SoundSubtitlesSourceDescriptionResource locationTranslation keyVolumePitchAttenuation
distance
Block brokenBlocksOnce the block has brokenblock.metal.breaksubtitles.block.generic.break1.01.216
Block placedBlocksWhen the block is placedblock.metal.placesubtitles.block.generic.place1.01.216
Block breakingBlocksWhile the block is in the process of being brokenblock.metal.hitsubtitles.block.generic.hit0.250.7516
None[sound 1]Entity-DependentFalling on the block with fall damageblock.metal.fallNone[sound 1]0.51.2516
FootstepsEntity-DependentWalking on the blockblock.metal.stepsubtitles.block.generic.footsteps0.151.516
  1. a b MC-177082

Bedrock Edition:

SoundSourceDescriptionResource locationVolumePitch
BlocksOnce the block has brokendig.stone1.01.1-1.2
BlocksWhen the block is placeduse.stone1.01.2-1.25
BlocksWhile the block is in the process of being brokenhit.stone0.30.75
PlayersFalling on the block with fall damagefall.stone0.41.0
PlayersWalking on the blockstep.stone0.351.0
PlayersJumping from the blockjump.stone0.121.0
PlayersFalling on the block without fall damageland.stone0.221.0

Data values[]

ID[]

Java Edition:

NameIdentifierFormBlock tagsItem tagsTranslation key
Detector Raildetector_railBlock & Itemprevent_mob_spawning_inside
rails
railsblock.minecraft.detector_rail

Bedrock Edition:

NameIdentifierNumeric ID FormItem ID[i 1]Translation key
Detector Raildetector_rail28Block & Giveable Item[i 2]Identical[i 3]tile.detector_rail.name
  1. ID of block's direct item form, which is used in savegame files and addons.
  2. Available with /give command.
  3. The block's direct item form has the same id as the block.

Block states[]

See also: Block states

Java Edition:

Name Default value Allowed values Description
poweredfalsefalse
true
True if rail is activated.
shapenorth_south east_west
north_south
Specifies the rail's orientation.
ascending_east
ascending_north
ascending_south
ascending_west
A rail that ascends toward the direction noted.
For example, an ascending_west rail is a straight rail that goes upward from the east toward the west.
waterloggedfalsefalse
true
Whether or not there's water in the same place as this rail.

Bedrock Edition:

NameMetadata Bits Default value Allowed valuesValues for
Metadata Bits
Description
rail_data_bit0x8falsefalse
true
0
1
True if rail is activated.
rail_direction0x1
0x2
0x4
0 00 flat track going north-south
11 flat track going east-west
22 sloped track ascending to the east
33 sloped track ascending to the west
44 sloped track ascending to the north
55 sloped track ascending to the south
6
7
8
9
UnsupportedUnused

Video[]

History[]

Java Edition Beta
1.5Detector Rail (NS) JE1 BE1 Detector Rail (EW) JE1 BE1 Detector Rail (nS) JE1 BE1 Detector Rail (Ew) JE1 BE1 Detector Rail (Ns) JE1 BE1 Detector Rail (eW) JE1 BE1
Added detector rails.
Java Edition
1.0.0Beta 1.9 Prerelease 6Detector Rails are now broken faster using a pickaxe.
1.3.112w21aDetector rails are now renewable, due to redstone dust being obtainable from trading.
1.513w10aPowered Detector Rail (NS) JE1 BE1 Powered Detector Rail (EW) JE1 BE1 Powered Detector Rail (nS) JE1 BE1 Powered Detector Rail (Ew) JE1 BE1 Powered Detector Rail (Ns) JE1 BE1 Powered Detector Rail (eW) JE1 BE1
A texture for active detector rails has now been added.
1.915w44aDetector rails can now be found in chest minecarts in mineshafts.
1.1116w32bAll rail types' hitbox heights have now been decreased from a full block to a half block.
1.1418w43aDetector Rail (NS) JE2 BE2 Detector Rail (EW) JE2 BE2 Detector Rail (nS) JE2 BE2 Detector Rail (Ew) JE2 BE2 Detector Rail (Ns) JE2 BE2 Detector Rail (eW) JE2 BE2
Powered Detector Rail (NS) JE2 BE2 Powered Detector Rail (EW) JE2 BE2 Powered Detector Rail (nS) JE2 BE2 Powered Detector Rail (Ew) JE2 BE2 Powered Detector Rail (Ns) JE2 BE2 Powered Detector Rail (eW) JE2 BE2
The textures of detector rails have now been changed.
19w12bDetector rails can now be placed on glass, ice, glowstone and sea lanterns.
1.1720w45aAll rail types can now be waterlogged.
Pocket Edition Alpha
v0.13.0build 1Detector Rail (NS) JE1 BE1 Powered Detector Rail (NS) JE1 BE1 Added detector rails.
v0.14.0build 1Detector rails can now be found inside minecart with chests in mineshafts.
Bedrock Edition
1.10.0beta 1.10.0.3Detector Rail (NS) JE2 BE2 Powered Detector Rail (NS) JE2 BE2 The textures of detector rails have now been changed.
Legacy Console Edition
TU1CU1 1.0 Patch 11.0.1Detector Rail (NS) JE1 BE1 Powered Detector Rail (NS) JE1 BE1 Added detector rails.
1.90 Detector Rail (NS) JE2 BE2 Powered Detector Rail (NS) JE2 BE2 The textures of detector rails have now been changed.
New Nintendo 3DS Edition
0.1.0Detector Rail (NS) JE1 BE1 Powered Detector Rail (NS) JE1 BE1 Added detector rails.

Data history[]

Java Edition
1.814w10aDetector rails with numerical metadata variants 6, 7, 14 and 15, which are inaccessible through normal gameplay or even commands and as such require the use of external editors to exist, now have no model Missing Model JE2. Their appearances prior to this point were unknown.
14w25aDetector rails are now defined via block states rather than by numerical metadata. Prior to this version, the numerical metadata variants of the detector rail were as follows:
DV Description
0 Unpowered north-south
1 Unpowered east-west
2 Unpowered ascending east
3 Unpowered ascending west
4 Unpowered ascending north
5 Unpowered ascending south
6-7 Inaccessible - behavior unknown
8 Powered north-south
9 Powered east-west
10 Powered ascending east
11 Powered ascending west
12 Powered ascending north
13 Powered ascending south
14-15 Inaccessible - behavior unknown
14w26aDetector rails with metadata values 6, 7, 14 and 15 have now been completely removed from the game.
1.1317w47aPrior to The Flattening, this block's numeral ID was 28.

Issues[]

Issues relating to "Detector Rail" are maintained on the bug tracker. Report issues there.

Gallery[]

See also[]

  1. MC-182709 — resolved as "Invalid".
Advertisement