RailSwitch: Difference between revisions

Shoehorn link to Rail Mechanics
(Shoehorn link to Rail Mechanics)
 
(9 intermediate revisions by 4 users not shown)
Line 1:
{{Mechanics series}}
'''RailSwitch''' (also known as "'''The /dest Plugin'''") is a rail transport plugin used on some Civ servers such at CivClassics and CivRealms, it allows someone to set a destination when using rails.
'''RailSwitch''' is a plugin ([https://github.com/CivMC/RailSwitch source]) that enhances [[Rail Mechanics]] allowing automated routing across rail lines according to a specified destination. The plugin works by using the redstone mechanics of [https://minecraft.gamepedia.com/Rail#Placement T-junction], which follows the [https://minecraft.gamepedia.com/South-east_rule South-east rule], interaction with [https://minecraft.gamepedia.com/Detector_Rail detector rails]. The plugin allows the detector rail to send a redstone signal only if the person in the marketminecart chose the right destination. This plugin can '''only workswork in one way rail'''direction as the player has to arrive from a certain direction. Also, it can only choose between two destinationdestinations for a total of three rail directiondirections : one starting point and two destinations.
 
= Usage =
If the rail is set up, simply write <code>/dest place</code> where <code>place</code> is the place where you want to go. You can also chain destinations, and<code>/dest travelplace1 toplace2</code> them in order,etc. this can be useful for taking a route via specific junctions, RailSwitch will route players towards signs that contain either <code>place1</code> or <code>place2</code>.<ref name=":0">https://github.com/okx-code/RailSwitch/blob/master/README.md</ref> Stations where /dest has been set up will probably list possible destinations on signs, if you use normal direct rails between A and B /dest will do nothing.
 
= Setup =
== Idea of the plugin ==
The plugin works by using the redstone mechanics of [https://minecraft.gamepedia.com/Rail#Placement T-junction], which follows the [https://minecraft.gamepedia.com/South-east_rule South-east rule], interaction with [https://minecraft.gamepedia.com/Detector_Rail detector rails]. The plugin allows the detector rail to send a redstone signal only if the person in the market chose the right destination. This plugin can '''only works in one way rail''' as the player has to arrive from a certain direction. Also, it can only choose between two destination for a total of three rail direction : one starting point and two destinations.
 
== Block placement ==
A sign with the destination name on it must be placed over a detector rail and reinforced under the same group. The sign first line must be <code>[destination]</code>, then the other three lines can be destination names. They have to be placed before the T-junction. You may also use <code>[!destination]</code>, which will activate the rail if a player's destination is not on the signs.<ref name=":0" />
 
<center>
{|
Line 19 ⟶ 17:
 
== Interaction ==
Upon passing on the detector rail, the redstone signal will activate only if the player on the minecart chose a direction written on the sign. If it's the case, the detector rail will send a signal which will allow the T-junction to change direction, thosethus allowing the player to chose a direction. In the exempleexample on the right, if the player had the mall set has their destination, the detector would send a redstone signal which would change the T-junction orientation, thosethus sending the player to the mall. If the player had an otheranother destination setup, the detector rail won't send a redstone signal, and the player would continue straight up as per the normal T-junction rules.
[[File:RailSwitchRailChanging.png|thumb|When the redstone signal is sent, the T-junction change direction]]
Additionally, the destination <code>*</code> is a special case, which activates the detector rail if the player has any destination set, which can be used to redirect rogue carts and players who've forgotten to set their destination.
 
== Direction of the rail ==
Line 35 ⟶ 34:
=== Going to the mall by default ===
To make the player go to the mall by default, the T-junction has to be powered, and unpowered when someone wants to go to the stables. Using an inverter makes this possible. If a player arrives without having set their destination to <code>stables</code>, the T-junction won't change and they'll head to the mall.
 
== References ==
<references />
[[Category:Transportation]]
 
{{Template:Mechanics}}
302

edits