Stations
MCM has the power to create large rail networks with intersections that adjust themselves when minecarts come near.
Overview
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.
Setting destinations
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]
- Destination
Examples
- 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]
- Cityville-A4
- [Set Station]
- Cityville-A3
- etc
Rule signs
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.
Valid conditions:
Condition | Description |
---|---|
st-station | the minecart's destination matches station based on the server match rules. |
empty | The minecart is empty |
player | The minecart has a player passenger |
mob | The minecart has a non-player passenger |
playername | The minecart has a passenger named playername |
ent:type | The minecart has an entity of type type |
cargo | The minecart has a chest that is not empty |
storage | The minecart has a chest |
powered | The minecart has a furnace |
west | The minecart is traveling west |
east | The minecart is traveling east |
north | Theminecart is traveling north |
south | The minecart is traveling south |
redstone | The minecart is on powered rails or the block below the track is powered |
default | this line will always run if the minecart has not matched a previous line |
D | same as default |
The commands that can be paired with the above conditions are as follows:
Command | Description |
---|---|
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 | 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. |
Examples
- Destroy empty minecarts, route minecarts with passengers to the north, and all other carts to the west.
- empty:D
- player:N
- mob:N
- default:W
- Route minecarts headed to Cityville to the west, and towards Farmland to the east. Works with any server match setting.
- st-Cityville:W
- st-Farmland:E
- 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)
- st-City*-A*:E
- st-City*-B*:N
- default:D
- Eject and destroy minecarts with the destination of Cityville-A1. Passengers will eject at the lapis_ore block.
- st-City*-A1:D
- st-City*-A1:D
Intersection Prompts
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.
Settings | Descrption |
---|---|
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. |
2 Never | 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.
Restricting choices
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:
- [restrict:X]
on any line, where X is N, S, E, or W. The specified direction will not be a valid choice for the rider.