MinecartRouting

Minecart Routing

This is my first plugin and I hope you'll enjoy it. Please give feedback (espacially on usability and performance) and report any kind of bugs.

MinecartRouting

This plugin adds advanced features for minecarts like craftbook or MinecartMaia does. But it has an additinal options for automated routing of minecarts. You can define a destination and the minecart is routed to this destination by finding the shortest path to the destination.

Configuration

Quick HowTo

Place block

First place of one of the routingblocks defined in config and place a rail above:

  • Booster (default: goldblock): boosts passing minecarts
  • Brake (default: soulsand): braks passing minecarts
  • Launcher (default: obsidian): launches a minecart in a direction, defined by signoptions
  • Catcher (default: brickblock): catches a passing minecart if one of the signoptions matches
  • Switch (default: ironblock): changes the direction of the rail, depending from signoptions
Place signs

Add signs (if the block needs) within radius (in every direction, also up and down) defined in config (default: 3), shifted in the direction which should be used as criteria for incoming direction. Options are passed from first line->last line. The first match on the options defines the direction. The format on the sign is [<option>:<direction>]

Available options:

  • #<playername> : <playername> is riding minecart
  • empty : no passenger in minecart
  • player : a player is in the minecart
  • mob : a monster or animal is in the minecart
  • storage : it's a storage minecart
  • powered : it's a powered minecart
  • auto : directs minecart to his destination, if a destination is set and destination is reachable

Available directions:

  • left / l
  • right / r
  • ahead / a
  • north / n
  • east / e
  • south / s
  • west / w

To give the block a name simply write on a sign in any direction on any line [name] and on the next line the <name> you want the block to be given.

Add block to database

Next you have to left-click while sneaking the RoutingBlock or the rail above with the tool-item defined in conig (default: woodenaxe). Then the block is added to the database with the information on the signs, so you can destroy the signs afterward.

Set destination for "auto" criteria

To set your destination for the "auto"routing option, place a sign with the first line [destination] and on the second one the <name> of your destination RoutingBlock or a # followed by the id (to get see "show informations") of the block. Then right-klick this sign and your destination is set. To unset your destination you have to right-klick a sign which has in the first line [reset].

Benefit from RoutingBlock

Now when a minecart passes over a RoutingBlock the options for the incoming direction (defined by the offset of the sign on creation) are evaluated and if there is a match the action of the block will take place (exception: booster and brake, they work without options).

Show informations of a RoutingBlock

If you right-klick a RoutingBlock or the rail above with the tool-item all informations are displayed in chat.

SourceCode


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files