Detector Rail

This article is about the detector rail. For other types of rails, see Rail (disambiguation).
Detector Rail
Detector Rail.png: Infobox image for Detector Rail the block in Minecraft
Powered Detector Rail.png: Infobox image for Detector Rail the block in Minecraft
Invicon Detector Rail.png: Inventory sprite for Detector Rail in Minecraft as shown in-game with description: Detector Rail
Renewable

Yes

Stackable

Yes (64)

Tool
Blast resistance

0.7

Hardness

0.7

Luminous

No

Transparent

Yes

Waterloggable

Yes

Flammable

No

Catches fire
from lava

No

Map color (JE)


 0 NONE

The detector rail is a type of rail that produces a redstone signal while a minecart is on it.

Obtaining

Breaking

The suitable tool to break detector rail is pickaxe.

Block Detector Rail
Hardness 0.7
Tool
Breaking time (sec)[A]
Default 1.05
ItemSprite wooden-pickaxe.png: Sprite image for wooden-pickaxe in MinecraftWooden 0.55
ItemSprite stone-pickaxe.png: Sprite image for stone-pickaxe in MinecraftStone 0.3
ItemSprite copper-pickaxe.png: Sprite image for copper-pickaxe in MinecraftCopper 0.25
ItemSprite iron-pickaxe.png: Sprite image for iron-pickaxe in MinecraftIron 0.2
ItemSprite diamond-pickaxe.png: Sprite image for diamond-pickaxe in MinecraftDiamond 0.15
ItemSprite netherite-pickaxe.png: Sprite image for netherite-pickaxe in MinecraftNetherite 0.15
ItemSprite golden-pickaxe.png: Sprite image for golden-pickaxe in MinecraftGolden 0.1
Legend
  • incorrect tool, drops nothing
  • correct tool, drops nothing or something other than the block itself
  • correct tool, drops the block itself
  • italicized can be instant mined
  1. These durations ignore any other influential factors (e.g., Mining Fatigue) and are measured in seconds. For more information, see Breaking § Speed.

Detector rail drops itself when it's destroyed.

Generated loot

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

Crafting

Ingredients Crafting recipe
Iron Ingot +
Stone Pressure Plate +
Redstone Dust
Invicon Iron Ingot.png: Inventory sprite for Iron Ingot in Minecraft as shown in-game linking to Iron Ingot with description: Iron IngotInvicon Iron Ingot.png: Inventory sprite for Iron Ingot in Minecraft as shown in-game linking to Iron Ingot with description: Iron IngotInvicon Iron Ingot.png: Inventory sprite for Iron Ingot in Minecraft as shown in-game linking to Iron Ingot with description: Iron IngotInvicon Stone Pressure Plate.png: Inventory sprite for Stone Pressure Plate in Minecraft as shown in-game linking to Stone Pressure Plate with description: Stone Pressure PlateInvicon Iron Ingot.png: Inventory sprite for Iron Ingot in Minecraft as shown in-game linking to Iron Ingot with description: Iron IngotInvicon Iron Ingot.png: Inventory sprite for Iron Ingot in Minecraft as shown in-game linking to Iron Ingot with description: Iron IngotInvicon Redstone Dust.png: Inventory sprite for Redstone Dust in Minecraft as shown in-game linking to Redstone Dust with description: Redstone DustInvicon Iron Ingot.png: Inventory sprite for Iron Ingot in Minecraft as shown in-game linking to Iron Ingot with description: Iron Ingot
Invicon Detector Rail.png: Inventory sprite for Detector Rail in Minecraft as shown in-game with description: Detector Rail6

Usage

To place a detector rail, use a detector rail item while pointing at a surface facing the space the detector rail should occupy.

A detector rail can be placed on top of any block whose top face has a rim around the edge, such as any full block, hopper, top slab, upside-down stairs, or top trapdoor. A full list of compatible blocks can be found here.

If a detector rail is updated while on an opened top trapdoor, the rail breaks and drops as an item. Placing a minecart on a detector rail on top of a closed and unpowered trapdoor opens the trapdoor and updates the rail, causing the detector rail to break. If the top trapdoor is powered and closed when the minecart is placed, the trapdoor does not open so the rail does not break. The minecart on the detector rail then powers the trapdoor, meaning the external power source can be removed without causing the trapdoor to change state and break the rail.

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

Example for signal strength of a full minecart (right) and a half-full one (left)
See also: Redstone circuit

A detector rail becomes powered when any part of any minecart's bounding box comes into contact with it. Every 20th game tick after the rail first becomes powered, it checks whether any minecart is still present and depowers if there are none in contact at that time. This means that the duration of the signal is always a multiple of 20 game ticks (10 redstone ticks). While powered, a detector rail:

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.

Mob interaction

Like other types of rails, spiders, cave spiders, and wardens are the only land mobs that can walk onto detector rails.

Piston interactivity

Detector rail can be pushed by the piston, and can be pulled by the sticky piston. However, detector rail breaks and drops as an item when it is unsupported because of being moved.

Sounds

Java Edition:

BlockSprite block-of-gold.png: Sprite image for block-of-gold in Minecraft metal sound type
SoundClosed captionsSourceDescriptionIdentifierTranslation 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
​Something falls on a blockEntity-DependentFalling on the block with fall damageblock.metal.fallsubtitles.block.generic.fall0.51.2516
​FootstepsEntity-DependentWalking on the blockblock.metal.stepsubtitles.block.generic.footsteps0.151.516

Bedrock Edition:

BlockSprite block-of-gold.png: Sprite image for block-of-gold in Minecraft metal sound type
SoundClosed captions
[upcoming: BE 26.0]
SourceDescriptionIdentifierTranslation key
[upcoming: BE 26.0]
VolumePitch
​Block brokenBlocksOnce the block has brokendig.stonesubtitles.block.generic.break1.01.1-1.2
​Block placedBlocksWhen the block is placeduse.stonesubtitles.block.generic.place1.01.2-1.25
​Block breakingBlocksWhile the block is in the process of being brokenhit.stonesubtitles.block.generic.hit0.30.75
​FootstepsPlayersFalling on the block with fall damagefall.stonesubtitles.block.generic.footsteps0.41.0
​FootstepsPlayersWalking on the blockstep.stonesubtitles.block.generic.footsteps0.351.0
​FootstepsBlocksJumping from the blockjump.stonesubtitles.block.generic.footsteps0.121.0
​FootstepsBlocksFalling on the block without fall damageland.stonesubtitles.block.generic.footsteps0.221.0

Data values

ID

Java Edition:

NameIdentifierFormBlock tagsItem tags Translation key
BlockSprite detector-rail.png: Sprite image for detector-rail in Minecraft Detector Raildetector_railBlock & Itemprevent_mob_spawning_inside
rails
rails block.minecraft.detector_rail

Bedrock Edition:

NameIdentifierNumeric ID FormItem ID[i 1] Translation key
BlockSprite detector-rail.png: Sprite image for detector-rail in Minecraft 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

Videos

History

Java Edition

Java Edition Beta
1.5
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.513w10a
A texture for active detector rails has now been added.
1.814w28aSloped detector rails no longer decrease their hitbox to 2 pixels of a block when activated.
1.915w38aAll sloped rail types' hitbox heights have been decreased from 10 pixels of a block to about 2.5 pixels of a block.
15w44aDetector rails can now be found in chest minecarts in mineshafts.
15w46aMobs no longer spawn on detector rails.
1.1016w21aAll sloped rail types' hitbox heights have been increased from about 2.5 pixels of a block to a full block.
1.1116w32bAll sloped rail types' hitbox heights have now been decreased from a full block to a half block.
1.1418w43a

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.

Bedrock Edition

Pocket Edition Alpha
v0.13.0build 1 Added detector rails.
v0.14.0build 1Detector rails can now be found inside minecarts with chests in mineshafts.
Bedrock Edition
1.7.0beta 1.7.0.2Rails are once again broken by flowing water. Previously it flowed through the rails.
1.10.0beta 1.10.0.3 The textures of detector rails have now been changed.

Legacy Console Edition

Legacy Console Edition
Xbox 360Xbox OnePS3PS4PS VitaWii USwitch
TU1CU11.001.001.00Patch 11.0.1 [verify] Added detector rails.
TU46CU361.381.381.38Patch 15All sloped rail types' hitbox heights have been increased from 10 pixels of a block to a full block.
TU54CU441.521.521.52Patch 241.0.4All sloped rail types' hitbox heights have now been decreased from a full block to a half block.
TU69 1.761.761.76Patch 38 All types of rails can now be waterlogged and are no longer destroyed by flowing water. Instead it flows right through them.
1.90 The textures of detector rails have now been changed.

New Nintendo 3DS Edition

New Nintendo 3DS Edition
0.1.0 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 . 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
BlockSprite detector-rail.png: Sprite image for detector-rail in Minecraft 0 Unpowered north-south
BlockSprite detector-rail.png: Sprite image for detector-rail in Minecraft 1 Unpowered east-west
BlockSprite detector-rail.png: Sprite image for detector-rail in Minecraft 2 Unpowered ascending east
BlockSprite detector-rail.png: Sprite image for detector-rail in Minecraft 3 Unpowered ascending west
BlockSprite detector-rail.png: Sprite image for detector-rail in Minecraft 4 Unpowered ascending north
BlockSprite detector-rail.png: Sprite image for detector-rail in Minecraft 5 Unpowered ascending south
BlockSprite missingno.png: Sprite image for missingno in Minecraft 6-7 Inaccessible - behavior unknown
BlockSprite detector-rail.png: Sprite image for detector-rail in Minecraft 8 Powered north-south
BlockSprite detector-rail.png: Sprite image for detector-rail in Minecraft 9 Powered east-west
BlockSprite detector-rail.png: Sprite image for detector-rail in Minecraft 10 Powered ascending east
BlockSprite detector-rail.png: Sprite image for detector-rail in Minecraft 11 Powered ascending west
BlockSprite detector-rail.png: Sprite image for detector-rail in Minecraft 12 Powered ascending north
BlockSprite detector-rail.png: Sprite image for detector-rail in Minecraft 13 Powered ascending south
BlockSprite missingno.png: Sprite image for missingno in Minecraft 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. Issues should be reported and viewed there.

Gallery

Screenshots

See also

Navigation

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