Rail

Rails (also known as minecart tracks) are non-solid blocks that provide a path along which minecarts can travel.

Obtaining
Rails can be mined with anything, but pickaxes are the quickest.

They also drop as items when:
 * the block beneath them falls, is moved, or removed
 * a liquid flows over them
 * a piston moves them into a space with no floor below them

Natural generation
Rails can be found naturally in abandoned mine shafts.

Usage
When placed a rail will configure itself to be straight or curved according to rail objects around it.
 * If there are no other rails adjacent it will be placed as a straight track oriented north-south.
 * If placed at the end of an existing stretch of track (so any of rails, activator rails, detector rails, and powered rails) the new rail be a straight track section oriented to continue the existing track, either east-west or north-south.
 * If placed beside an existing stretch of track (of any type) the newly placed rail will be straight and oriented north-south.
 * If there are two adjacent rails on its level, or one level up or down, the newly placed rail will configure itself to connect the other two. This means that it will be placed as a straight or curved track as needed.
 * If placed between three adjacent rails (thus always forming a T-junction) the newly placed rail will be placed as a curved track south-to-east, north-to-east, or south-to-west to join those sides.



Note that existing tracks one block up and down are considered for adjacency in the same manner, and the new piece of track will be laid as a curve, but unless space is left for sloping track sections mine carts will only be able to continue past the curve on level or one-block-down corners. In one block up corners the cart will be left buried in the ground.
 * If placed between four adjacent rails it will not form a cross-roads connection, but rather will be curved from south-to-east.

Existing sections of track may be re-oriented, become sloping, or even change into curved sections when new rail is placed adjacent to : . If a track is placed perpendicular to an existing length of track, then the track connecting them will turn into a curve. However, destroying track will not cause remaining track to re-orient itself.
 * An existing straight, north-south rail will re-orient to east-west when a new block is placed to its east or west sides.
 * If placed next to an existing rail that is one block up or down the rail will slant upwards towards it. rail "prefers", in order: west, east, south, and north). Other configurations can be created by placing and removing various rails.

If a track leads up to a one-block high ledge, the piece placed up against the ledge will turn into a ramp if another track is placed on top of the ledge.

Minecarts that encounter a series of curved tracks in an alternating, zig-zag pattern will travel in a straight line at 45 degrees until the track straightens out or curves in the same direction twice (u-turn), but it will still lose speed as though it were going through a series of bends.

The curved section of a rail at T intersections can be powered by redstone circuits and their direction can change with switches provided there is no confusion about the 2 directions to switch to. Separate tracks laid adjacent but at the next level lower or higher can sometimes cause issues. Since there are no formal rail junctions, switched T intersections are the only method by which the player can have a track system that leads in more directions than back and forth. In rare cases, curved track sections will not change appearance when their direction is changed. If a track switching mechanism seems to be inexplicably broken, test it by running a cart on the track rather than by looking at how the track appears to be oriented. Redstone circuits will not affect normal track blocks or track ramps.

Rail collision
When a cart is traveling on a curve, it will momentarily lose collision prior to exiting the curve. Therefore, if a block is placed directly after the curve instead of a track piece, the cart will phase through it.

It should be noted that since minecarts travel diagonally on curves, it can miss the hole if it has enough speed, by skipping over it, if the hole is 1x1. This can be avoided by blocking the sides.

It is not recommended to use this method in rapid succession, as the cart will slow down a lot. Anyone sitting in the cart will likely be subject to suffocation.

South-east rule


At non-curve track intersections, minecarts will always travel south or east (as shown in the diagram to the left). This is commonly referred to as the south-east rule.

This rule also applies to T-intersections, and determines which way the curve from the intersection will face when unpowered.

Downhill rule


At non-curve track intersections minecarts will always travel downhill if they can. This is known as the downhill rule and overrides the south-east rule.

Ramp clearance/one-way effect


A block placed above the track at the downhill end of a ramp will prevent minecarts from traveling down the slope, but not up. In order for a minecart to move down a diagonal tunnel, there must be just as much clearance as a player needs to walk it.

Curve intersections


If a straight track piece leads to a curve block and isn't attached to the curve, a minecart will run over the gap and continue to go straight over the curve. This is not applicable with other types of rails.

Notably, the minecart can exceed the normal 8 m/s speed limit while it jumps over the gap. For example, by placing intersections on every other block of a straight track, it is possible to travel at 10 m/s in a straight direction (but it will be a very uncomfortable ride).

Data values
Every rail has an ID name of  and stores its orientation in its block data. A rail also has a block state which is expected to replace the functionality of block data in a future version.

Block data
A rail's block data specifies the directions to which it connects.

Trivia

 * When walking on a block that has a rail on top, you will hear the sound of the block you're walking on, but if you jump (while still walking), you will hear the sound of iron.
 * Rails are approximately 2-foot gauge (the gauge is the distance between the rails).

Gallery
Schiene Raíl Rails Sín レール 레일 Spoor Tory Рельсы 铁轨