Minecart

Minecarts are rideable entities placed on rails that can be used to carry items, mobs, and the Player. They are used as a form of transportation to cover long distances, since they are much faster than walking. Additionally, they are used for recreation — intricate roller coasters have been created through clever track placement and design.

From special minecarts
Minecarts can also be obtained by breaking special minecarts:


 * Breaking a minecart with chest or hopper drops a minecart and a chest or hopper, respectively, as well as the contents of the broken storage minecart.
 * Breaking a minecart with TNT drops a minecart and a block of TNT.
 * Breaking a minecart with furnace drops a minecart and a furnace, but no fuel.
 * Breaking a minecart with command block or spawner drops only a minecart.

Usage
Minecarts are placed in the same manner as other blocks; however, they can only be placed on top of rails. Once placed, they may be derailed by pushing them off of the end of the track.

Once placed, minecarts can be hit, which reverts them back to an item. This can't be done while they are being ridden. Swords and picks can do this in one hit with no decrease in durability; one arrow will do the same, but the arrow will be lost.

Transportation


Minecarts can be ridden by right-clicking them. Once inside, the player can move, but an external impulse (a powered minecart, powered rail, or other player) may be needed. It is possible to push the minecart yourself and then jump in. The player can slowly move the minecart while riding it, by using the direction keys. Mobs (notably tamed ocelots) can also push minecarts.

Players can exit the minecart by pressing the LShift key (a change introduced on 1 July 2013 - previously the dismount command was right clicking), however if there is only one block of headroom above the cart the player will take half a heart of suffocation damage as his head will be temporarily through the ceiling. When the minecart is exited (by pressing LShift), it searches for an adjacent or diagonal 2x2x3 area to put the player 1.5 blocks away from the cart. If none is available, the player is deposited directly above the minecart. Consequently, the player falls inside the minecart. It is possible to interact with the environment while riding a cart, such as shooting a bow at enemies or laying down track in front of the minecart while it is moving.

After rolling off of the end of a track, a minecart can be pushed around on open blocks. If a minecart is pushed onto or falls onto tracks, it will "snap" to those tracks. A minecart will transfer any fall damage it suffers onto its rider, and will not be destroyed upon impact.

A minecart will stop dead when it encounters an arrow, whereas it will bounce off or fly past (if fast enough) a player.

If a mob is pushed into a rideable minecart, the mob will ride it, until being displaced by the player entering the cart, or when the world is quit and reloaded. For example, if a zombie is punched into a minecart sitting on a powered rail, and the rail is switched on, the zombie will start riding the minecart. However, mobs will NOT enter a minecart unless pushed in by a player (meaning that a creeper won't enter a minecart to chase you down).

Speed
Minecarts have a predefined speed limit of 8 m/s per axis of travel. (1 block = 1 meter; 8 m/s = 28.8 km/hr.) A minecart traveling diagonally can therefore travel up to 11.314 m/s (i.e. the square root of 82 + 82). When a minecart comes to a turn it moves diagonally across that turn.

Boosting
Powered rails, while powered, will boost the speed of a minecart, and while not powered, will bring it to a halt.

Loss of speed
One unit of kinetic energy could be defined as the energy gained by a cart going down a one block slope, and lost by a cart when it goes up a one block slope. If a 45 degree downward slope is connected directly into an upward slope, an initial height of 60 blocks will result in a final height of 40 blocks, a loss of 20 units of potential energy. But if 20 sections of flat track are inserted between the slopes, the final height will be 35. This implies that one unit of energy is lost for every 4 sections of horizontal track traveled with an initial stored energy of between 60 and 40. At much lower speeds, much less energy is lost, implying that the energy lost is a percentage of the cart's current energy. The above gives about 0.5% energy loss per section of track. One implication of this is that more energy lost when the cart has more energy, so a gradual slope should allow you to travel much farther distances than a steep slope followed by a long flat section. (This is different from real-life physics, where friction does not increase with velocity. However, it may be an attempt to mirror air resistance, which is proportional to the square of velocity.).

Anything in the way of the minecart will take it to a dead stop, including: blocks, items, and mobs. Once a minecart has left the track, it will rapidly decelerate within one or two squares. It is possible to have a sufficiently boosted minecart "skip" over one square without a track, then rejoin the track at reduced energy later. When a mob touches a minecart they affect it in the same way a player would, i.e. mobs that move up against a still cart will set it in motion. When an empty minecart hits a mob, the mob will ride it.

If a minecart leaves your rendering distance it will lose all energy until it re-enters the rendering distance. Also, all minecarts will lose all energy when you leave the game and will render at the same point when you left. This could lead to stalling minecart loop boosters. This is untrue for servers; even after restarting the server, it should still be moving at the same pace it was before the restart, possibly due to a new physics upgrade in the coding around 1.4 or 1.5.

Merged minecarts
Merged minecarts are two or more minecarts merged. This can be done in various ways, one of which is putting a minecart on a 1-piece slope-track and letting another minecart fall on top of it. When minecarts are merged the player can still ride them. What makes them useful, however, is their odd way of losing speed. When coming off a track, merged minecarts initially lose their speed to around walking speed. But after first contact, they won't lose their speed anymore.

This way they can be used to cross certain distances when the player's only goal is to not actively walk towards the player's goal / target. Or when the player doesn't have enough resources to cover the complete distance, this measure can be considered. Note: for this concept to work, at least 3 minecarts will have to be merged. Doing this can detach the minecarts by pushing one off of the rails, or the one the Player is riding might get stuck on a tight turn. Speed may decrease when merged.

Unoccupied carts, incline and a boost
This table shows the distance traveled by an unoccupied minecart on an incline, with a boost (or no boost). The most efficient way is to use only 1 boost at the bottom of the incline on the flat surface. Using 2 will increase by about 20% or 1.5m. All distance trends based on the height seem to be logarithmic. The carts started from rest, on an incline (at Height).

Detecting minecarts
The detector rail is a switch activated by minecarts. It generates a Redstone charge when a minecart is on the rail.

Minecarts can also be detected when their corners run over pressure plates as they go around a curved track. The effect is similar to the detector rail, but can only occur at curves.

Collision
Minecarts seem to have about the same size as a block; 1x1. Because of this, a ladder, door or trapdoor will prevent it from falling down a 1x1 hole. This can be utilized to make minecart dispensers, by stacking carts on top of each other and dispensing them with the help of a booster. A single cart dispenser using a door can also be made by using a sign to block the cart from falling off the door. As of snapshot 12w15a, minecarts can also be placed directly on rails using Dispensers.

Previously, it was possible to transport carts along 1 block wide water streams without the minecarts falling by placing ladders underneath. By alternating the signs, items could still fall through. Because streams carried minecarts at a very slow rate, a trap could be made where anyone sitting in a cart would be suffocated in a block directly above the stream, and their items could then be collected below. However, since water no longer affects minecarts, this is no longer possible.

Carts on minecart tracks will also ignore collision in certain situations. A cart traveling downhill or on a curve with a block placed in front of it will go through the block. If it is going fast enough, it can skip through one block and reattach to track on the other side, at significantly reduced speed.

A player riding in a minecart will not collide with or suffocate in any transparent blocks, including glass, half slabs, and leaves.

Special minecarts
There are currently six types of special minecarts:
 * Powered Minecart - A self-propelled minecart that is powered by coal.
 * Storage Minecart - A minecart that can store items like a standard chest.
 * Hopper Minecart - A minecart that contains a Hopper and can collect items from along the track or chests placed above the track.
 * TNT Minecart - A minecart that contains a block of TNT that can explode when primed by an Activator Rail.
 * Spawner Minecart - A minecart that contains a Monster Spawner and can spawn entities wherever it goes. Cannot be created without mods or external editors, or, as of Snapshot 13w36a, NBT tags in commands, but still functions in vanilla Minecraft.
 * Minecart with Command Block - A minecart with a command block which is activated when the cart rolls over a powered Activator Rail (Item ID 422 in Snapshot 13w39a). Using /give or /summon is the only way to get this minecart.

Mojang has also released teaser images of another potential minecart, but it is not currently in the game:
 * Dispenser Minecart - A minecart which would presumably store and dispense up to 9 item stacks when powered with activator rails.

Minecart trains


To create a train, start with a fairly short length of straight track with an open ending on one side. Put a Powered minecart on the side nearest the open end, and then add storage minecarts or ridable minecarts along the rest of the track. Then, turn on your powered minecart. It will push the other minecarts as if it were a minecart train. Placing an additional powered minecart on the other end will allow you to make a two-way train, as minecarts currently only push other carts, not pull. If you are on a superflat world, there are a fairly large number of Slimes around. Kill the Slimes until you are left with a bunch of tiny ones. Hop in a minecart and the tiny slimes will push the minecart while trying to kill you. This is completely safe because tiny Slimes do not cause damage.

Trivia

 * Multiple minecarts in the same place can make them push each other, meaning that they can move without powered rails or even rails at all.
 * Endermen cannot teleport out of minecarts. They will try, but fail.
 * Minecarts appear to float above the track, as their model has no wheels.
 * Small slimes may be used to power a minecart by hitting it from behind. This strategy works fairly well, and can be used to power long minecart trains.
 * You can bump a medium slime in a minecart, and it can't attack you. However, a large slime can.
 * The large slime, large magma cube and ghast will completely cover a minecart.
 * A medium slime in a minecart has a small but powerful "Force Field" around it where you get pushed away, but not hurt.
 * Slimes in minecarts will divide if punched to death. This makes dividing slimes easy, as they can't move.
 * Minecarts automatically stored items until the storage minecart was put into the game.
 * Dropped items and skeleton arrows, if left on a track, will stop a minecart as if they were walls.
 * Tamed wolves will follow you when you are in a minecart.
 * If you view your inventory while riding in a minecart you will appear sitting down in mid-air.
 * The texture file, cart.png, features a large 'leather like' panel that used to be used as the bottom of the minecart when it contained items, back when minecarts were used to store items. However, it is now unused. MinecartStack.png
 * Minecarts can be set on fire, but the mob or player inside the minecart will not catch fire from a minecart.
 * Spiders can get "caught" in a minecart. On certain times of the day they can hurt you, but not always. A powered minecart cannot push the spider while the player and powered rails can. The spider cannot escape but it can look around.
 * The minecart can drive underwater if launched by rail and some air supplies underwater.
 * Spider Jockeys can propel themselves on flat surfaces and chase you.
 * Minecarts can be stacked onto each other.
 * Creepers can explode while in a minecart.
 * Minecarts can be dropped when the player shoots a fully charged arrow at it.
 * Ghast can ride minecarts, even though it flies.
 * Whilst minecarts have wheels when placed, their crafting recipe does not include them.
 * You are able to teleport to another minecart whilst sitting in a minecart by right clicking a minecart in your range.
 * If a minecart with other minecarts "stacked" on top of it falls into lava, they will sometimes drop a minecart item that can stay in the lava, yet never burn up. Note that these items can still despawn after 5 minutes, just like any item.