MCM has the power to create large rail networks with intersections that adjust themselves when minecarts come near.
Stations are indicated by the [Station] action on a sign or block (default BRICK).
Stations are typically located at rail intersections, and the associated Station Rules determine the routing. However [Station] blocks and signs may be placed anywhere for the purpose of ejecting passengers/cargo.
[Station] actions and Station Rule signs
When a minecart encounters a [Station] action, it looks around for Station Rule signs. These signs contain instructions for routing the intersection.
The intersection can be routed based on whether the minecart is empty or full, has a player, a mob, a chest, a furnace, a specific entity type, a specific item in a chest, has a certain player name, is traveling in a certain direction, or has redstone power.
Additionally, and more powerfully, the intersection can be routed based on the destination station set for the minecart. The station matching can be done simply or via pattern matching, enabling large networks to be created by specifying the destination at the start, and sitting back for the ride across multiple intersections.
A destination can be set for a minecart in 2 ways: with the /st command or the [Set Station] action. Simply call /st Destination or run the cart past a sign with
- [Set Station]
- Setting a different destination for each of the entrances with [Set Station] signs. (The station rule signs in this picture are below the brick blocks, they just route all traffic away)
- [Set Station]
- [Set Station]
All Station rule signs should be located within 2 blocks of the associated [Station] block or sign. All Station Rule signs are processed, line by line.
Each line on a Station Rule sign contains a Condition and a Command, separated by a :
If the Minecart meets the condition, the Command is executed and the minecart moves on.
|the minecart's destination matches station based on the server match rules.
|The minecart is empty
|The minecart has a player passenger
|The minecart has a non-player passenger
|The minecart has a passenger named playername
|The minecart has an entity of type type
|The minecart has a chest that is not empty
|The minecart has a chest
|The minecart has a furnace
|The minecart is traveling west
|The minecart is traveling east
|Theminecart is traveling north
|The minecart is traveling south
|The minecart is on powered rails or the block below the track is powered
|this line will always run if the minecart has not matched a previous line
|same as default
The commands that can be paired with the above conditions are as follows:
|N or north
|Send the minecart north, if possible
|E or east
|Send the minecart east, if possible
|S or south
|Send the minecart south, if possible
|W or west
|Send the minecart west if possible
|L or left
|Send the minecart to the left if possible
|R or left
|Send the minecart to the right if possible
|STR or straight
|Send the minecart straight if possible
|stop the minecart
|P or prompt
|If i has a player passenger, stop the minecart until the rider clicks in the desired direction of travel.
|EJ or Eject
|eject any passenger as if it hit a [Eject] action.
|D or destroy
|eject as above and destroy the minecart.
|V or vanish
|eject as above and destroy the minecart, ignoring the 'return minecarts to owner' server setting.
- Destroy empty minecarts, route minecarts with passengers to the north, and all other carts to the west.
- Route minecarts headed to Cityville to the west, and towards Farmland to the east. Works with any server match setting.
- Route minecarts headed to Cityville-A* stations to the east, and Cityville-B* stations to the north, otherwise destroy the cart. This requires server match setting of 1 (simple pattern matching)
- Eject and destroy minecarts with the destination of Cityville-A1. Passengers will eject at the lapis_ore block.
If not controlled by Station Rules, intersections can also automatically prompt a player passenger to push the cart in the direction he or she wishes to go. There is a server-level setting that dictates this behavior, it is called IntersectionPromptMethod in the config.yml and takes a value of 0, 1, or 2.
|0 Always prompt
|The rider will be prompted for a direction at any intersection, unless it has a station block and a valid station command was found.
|1 Station only
|The rider will only be prompted at intersections controlled by station rules, but at which no valid station rule was found.
|The rider will never be prompted at intersections, except in the situations below.
Other ways to prompt:
- The [Prompt] sign/block, default NETHER_BRICK, when placed at an intersection, will prompt the player for a direction.
- The :P station command will prompt the rider for a direction if used in a Station Rule sign.
If desired, a sign can be used to restrict the available choices to the rider at an intersection prompt. Near the intersection place a sign with:
on any line, where X is N, S, E, or W. The specified direction will not be a valid choice for the rider.