Mike's TC Addons: Addons for TrainCarts!
2022-10-14: Mark for partial deprecation. Individual components will be moved to individual plugins for a more modular approach.
- Install BKCommonLib and TrainCarts
- Download this plugin from the Releases page
- You're good to go!
- Make yourself the owner of the train
- Run
/throttle on
- Drive away!
- Make two animations with TrainCarts attachments called
door_L
anddoor_R
. - By placing and activating a
swap
sign underneath, you can swap thedoor_L
anddoor_R
animations. - Alternatively, run
/swap
.
- Make two animations with TrainCarts attachments called
door_L
anddoor_R
. - To play the
door_L
animation forwards, run/door l o
. - To play the
door_L
animation in reverse, run/door l c
. - To play the
door_R
animation, replacel
withr
.
- Run
/decouple <no. of carriages>
. If the number is positive, the carriages will be decoupled from the front of the train. Otherwise, they will be decoupled from the back. A value of 0 does nothing.
The per-minute trigger sign does the same as TrainCarts' original trigger sign, but it only updates every minute. Use this if the original trigger sign poses a lag issue.
[train]
trigger
<variable name>
<time (in minutes)
Unlike TrainCarts' trigger sign, this sign does not come with a record function.
This sign swaps the door_L
and door_R
animations.
[train]
swap
This sign does different things based on what it is programmed to do, in the Barrel Programming Language (next section). To work, this sign needs to be placed on a barrel.
[train]
barrel
The Barrel Programming Language is a specialised programming language similar to Java that is only used with this plugin. It can't do a lot, but it nonetheless can do stuff.
To run anything in Barrel (the language), write it in a book and quill and place it in a barrel (the block). Then, place a barrel sign on it and drive a train over it.
All statements in Barrel must be ended with a ;
.
-if () {...}
An if statement. Nothing special here.
-an(text);
Announces what is in the parentheses to the players in the train.
-ps(sound, volume, pitch);
Plays a sound to the players in the train.
-sl(variable, new_text);
Updates a signlink variable with the new text.