PdxTrackRouter

PdxTrackRouter

5.8k Downloads

PdxTrackRouter

Check out the new screenshots!

The PdxTrackRouter plugin allows users to create automatically routed mine cart rail systems. This is accomplished through a combination of "destination" signs and "junctions" signs. Minecarts will behave normally in the absence of any junction signs.

Destination signs should be placed wherever a user might want to select a new destination. The format for the signs is:

  1. [destination]
  2. destination name
  3. freeform text
  4. freeform text

When a user right clicks on a destination sign his destination tag will be stored.

Junction signs create automatic switching tracks. The signs should be placed at the corner of a 3/4 way rails junction or above the junction as a wall-sign, or below the block the junction is built on. Many of these signs may be stacked vertically if more lines are needed. The format of the junction sign is:

  1. [junction]
  2. DESTINATION: DIRECTION
  3. DESTINATION: DIRECTION
  4. ...

The destination can be any string which fits on the sign and should correspond to [destination] signs available to the user. The direction should be one of "north","south","east","west". (Only the first letter is checked).

Empty carts are always routed to the "empty" destination. Chest carts are routed to the "chest" destination. Powered carts are routed to the "engine" destination. Any cart will match the "default" destination. If no route on the junction sign matches the junction will attempt to send the cart straight through the junction without turning. These destinations are configurable in config.yml

The plugin will scrub all whitespace and color/formatting from the signs, so users are free to make their signs pretty using a plugin like Essentials.

The plugin does not stop players from breaking tracks or signs. A block protection plugin should be used for that.

Right click on an empty cart or chest cart with a sign in your hand to transfer your destination preference to that cart. This is great for moving chest carts full of goods along with you on the rail system. Carts with destinations set will move at full speed so that you can go with them. The tool is configurable.

Commands

/destination [DESTINATION] - Override your destination preference or clear it if left unspecified.

/changesign # TEXT - Change a line on the sign your cross-hairs are pointing at. This is a privileged operation and requires op or trackrouter.changesign

Example: /changesign 4 New line here

/junctions - Search for destinations which are connected to the piece of track you are standing on. This can be slow as it has to load chunks, so it runs in the background to avoid creating lag.

Junction Editing

To edit a junction, right click on the [junction] sign or the junction rail block and enter any of the following commands. BE CAREFUL giving this command to people as they can easily edit other kinds of protection signs at this point by placing a junction sign over an existing sign and edit through to the next sign. I'm open to ideas for how to protect against this. Line numbers start a 1 for the first line after the [junction] and continue through the whole stack of signs.

  • /junction insert # TEXT - Insert a new line at position #
  • /junction delete # - Delete the line at position # and move the others up
  • /junction change # TEXT - Change the line at position # and leave the rest alone
  • /junction list - Print the lines of the current junction sign

Automatic Storage Cart (un)loading

The plugin supports configurable loading and unloading of storage carts into chests. When a storage cart passes over a gold block it will load from the chests touching the sides of that gold block. When a cart passes over a diamond block it will unload into the chests touching that block. The blocks are configurable and the feature can be disabled using config.yml.

BE CAREFUL with this feature. If a player can build next to a chest he can extract the items from it.

Permissions

  • trackrouter.changesign - Change lines on signs in-place - default op
  • trackrouter.junctions - Use the /junctions command - default op
  • trackrouter.destination - Use the /destination command - default true
  • trackrouter.sign.junction.create - Create new junction signs - default true
  • trackrouter.sign.junction.edit - Edit junction signs in place - default op
  • trackrouter.sign.destination.create - Create new destination signs - default true
  • trackrouter.sign.destination.use - Use destination signs - default true
  • trackrouter.transfertool - Transfer your destination preference to a cart - default true

Source

Source code is available on github and is licensed under GPLv3

Demo

See the plugin live at pdxmc.com Head down the elevators to the "Train Station" floor 1 and try out the various stations. Additionally, there are a number of small examples on floor 2. The hub uses elevators: Destination floors can be select by right clicking on the sign above the button at an elevator.