TrainCarts
TrainCarts Development has moved to SpigotMC.
You can get the new versions at the following URL:
https://www.spigotmc.org/resources/traincarts.39592/
This page is no longer being actively monitored, please seek for support on SpigotMC.
Plugin: TrainCarts - Linked Minecarts, sign-redstone systems, easy to use and realistic
Version: v1.73.0
Build: 1.7.2 R0.1/R0.2
Incompatible with: RailCraft
Description
This plugin looks for suitable Minecarts and links them together if possible. When two Minecarts are being "linked", the Minecarts will act as one single moving train.
Once carts are successfully linked, an effect is played and their velocity is shared in combination with an individual factor for each Minecart, which is used to remain a steady gap between carts. This gap is adjustable, the force at which this happens as well.
End result: a train! You can move it, make a roller-coaster out of it, split it in half, watch trains collide, whatever you want to do with trains. :)
As for 1.21, it is also possible to safely exit your train by setting an exit offset with a (sideways) push factor for the train. This feature is disabled by default. (only affects dropped items). If you want to display arrival times on signs (see redstone circuit part) you need SignLink, see the downloads on the bottom of the page.
As for 1.35 you can set train properties to make 'special' trains, or to 'finalize' a train

Links
For configuration, permissions and how-to's, see the Wikipedia page (it is rather long):
Note that I would prefer having comments, bug reports and others in the main Bukkit page, since I visit that site the most. :)
Addons
Special Addons for TrainCarts
Features
- Link minecarts using collision: no commands needed to make a train
- Move trains as easily as you would with single Minecarts
- Store trains to file for persistence during reloads and server restarts
- Use sign-redstone circuits for subway systems, complete railroads and much more
- Station to gracefully stop and launch trains
- Spawn
- Teleport
- Property setters
- Tag systems to switch certain tracks based on tags on the train
- Destination systems to make your train travel to far-away lands all on it's own
- Supports Minecart Mania's features
- Infinite minecart speeds are possible
- Push-away: Push mobs, players and items away from your trains to keep them running
- Everything is configurable, if something proves not to be, I will make it that way
FAQ
When players are near, trains reach their destinations. With no one near, they don't. What do I do?
By default trains do not keep chunks loaded, and they will unload once they move into unloaded chunks. To make trains keep the chunk area (and themselves) around them loaded, set the 'keepchunksloaded' property to True. This can be done using the /train keepchunksloaded true command, using a property sign or by changing it to true in the DefaultTrainProperties.yml file. For more information about train properties, see here.
Why not boats?!?!
Incompatibilities
If you have another plugin that performs similar Minecart replacement techniques, it is likely that TrainCarts will not function or function poorly. For the 'chunk persistence' part of this plugin, other plugins that unload chunks without firing events result in this feature failing. Minebackup is known for having this problem.
Metrics
This plugin sends server count statistics to MCStats.org. You can (globally) opt out in the PluginMetrics/config.yml file.







-
View User Profile
-
Send Message
Posted Nov 11, 2012@MrKrisKrisu I tested it on my server, but it appeared to work. Could you send a screenshot of the set-up? I tested all possible sign directions, the only thing you could be having is that the sign is powered from somewhere.
-
View User Profile
-
Send Message
Posted Nov 11, 2012[!train] property slowdown false
doesn't work. I make a map now, where i can test the most of the functions. Then i can help you :)
-
View User Profile
-
Send Message
Posted Nov 11, 2012@MrKrisKrisu Thanks, I found the problem. It was having some initializer problems with the EMPTY default properties. (some sort of 'one needs the other to initialize but the other needs the other to initialize' issue. I think I didn't get that error because of the runtime environment version I use)
Now looking into that rail problem you are having.
EDIT
Re-uploaded test 5, its the same link: https:dl.dropbox.com/u/3681706/TrainCarts%20v1.72.1%20TEST5.zip
I couldn't find a problem with that track, but I think it is related to the curved bugs that I had to fix.
-
View User Profile
-
Send Message
Posted Nov 11, 2012Sorry for my Spamming.
Here my Server.log with all Errors ffrom test5
http://united-craft.de/traincarts/server.log
-
View User Profile
-
Send Message
Posted Nov 11, 2012@Etsija
That i have notice, too. I habe change the Rails so that does work. It is not the best solution but it work :P
-
View User Profile
-
Send Message
Posted Nov 11, 2012@bergerkiller
Sorry for my English :P
I have tested AutoPathfinding and Commands on Test5.
I am OP, but i cant use the Command /train. When i use the command /train destroyall comes this message: "An internal error occured while attemping this command! Please conside Plugin developer!".
The Station sign is broken, too. And the Auto Path Finding.
-
View User Profile
-
Send Message
Posted Nov 11, 2012Bergerkiller, I think I found a fatal bug: we have built a monorail which goes in the air, and all carts now get stuck at this bend: https://dl.dropbox.com/u/6411310/gets_stuck_at_this_bend.png
It doesn't help moving the bend backwards or forwards; all carts stop at the bend.
This happens with TEST2 version. Haven't loaded TEST5 (and probably won't, since it s being reported as broken...).
-
View User Profile
-
Send Message
Posted Nov 10, 2012@iKoze Included in test5:
New test version is up. Test5 changelog compared to test4:
https:dl.dropbox.com/u/3681706/TrainCarts%20v1.72.1%20TEST5.zip
I really need some testing on this one, especially those that use the keepChunksLoaded feature. I did some extensive tests on them, but nothing beats having 20 players running around on the server. To properly test it, just edit the train and let the train (which keeps chunks loaded) loose. If it takes too long for this train to reach a destination:
Use /train info. Is it unloaded? Use /train info again. Did the position change?
If the position changed, then it is still moving towards you, if not, then something could be wrong, or the train is waiting near a station somewhere. The unloaded state should be accurate enough, but you never know.
-
View User Profile
-
Send Message
Posted Nov 10, 2012Hi bergerkiller,
could you please add a line of code, that ignores minecarts/trains without destination set in the SignActionSwitcher.java. I just reviewed your code on github from SignActionSwitcher.java ("handle destination alternatively") until "public static PathNode get(final String name)" in PathNode.java and found out, that if no destination was set, the whole pathfinding is started to find the hypothetical destination, since the method get returns null on empty destination.
I don't know, what the destination string contains, if no destination was set but i assume it's ""; So I would recommend adding a check for that.
Greetings from Bavaria, iKoze
-
View User Profile
-
Send Message
Posted Nov 10, 2012@Etsija Yeah that would be nice, I can put it as a download link on the Minecraft WIKI if you like. Maybe it is best if you create a GitHub repository for it, or I create it, it is what you like best. It's better to have a link to a download page than to have a link to a direct download. Plus, some people may want to know the source code for whatever reason. :)
-
View User Profile
-
Send Message
Posted Nov 10, 2012I am already on my way to create a graph of the railwork the routing algorithm of TrainCarts sees. If I get something done, I could post it here and share the code with you, if you're interested? Don't know, maybe it could be of some use to someone wanting to have a look at why something is failing on his/her network...
-
View User Profile
-
Send Message
Posted Nov 10, 2012@Etsija To reset the destination, use the property sign: http:www.minecraftwiki.net/wiki/Bukkit/TrainCarts/Signs/Property
The blocker sign blocks while it is powered, you used [+train], so as a result it blocks forever. To 'unblock' it, put [train] or [!train] on the first line. Then you can use redstone to start or stop blocking using the sign. [!train] inverts input so will stop blocking once you send redstone power.
If you want to make a graphical system, it is best to load the .dat files directly, it is a lot easier to read it that way. You can check the source pastie I posted with it. Note that I didn't load part of the file: indirect neighbouring. The .dat file also contains 'all the possible connections one node has with another node'. For example, if you have:
<destination1><switcher><switcher><destination2>
It would show a connection from destination1 to destination2 with a direction and distance. This is the optimization I talked about.
-
View User Profile
-
Send Message
Posted Nov 10, 2012Also TCDestinationsConverter works beautifylly and the textual output is interesting. In fact it is so revealing I might write a script to interpret it in a crude graphical way...it would be VERY interesting way of debugging any route finding problems in our metro system in the future... :)
-
View User Profile
-
Send Message
Posted Nov 10, 2012@bergerkiller
I have to say I'm impressed by the level of support you're giving to the plugin users. I switched to using "+m" for my abbreviation and colouring of the Metro messages, and it works beautifully now!
As to the switcher signs: yes, I had misunderstood their funcionality without any further restrictions. They were indeed left to whatever state they happened to be, and then the further carts were misdirected on the switchers.
This was easy to fix: in the following figure, S-N is the default track, which should be driven if no destinations are set.
By writing simple switchers to the "0" nodes:
the trains now happily continue to North when coming from South, and if I set the destination towards the eastern track, the trains go there as they should. So, all in all, this works beautifully now that I understand the logic of it. Thank you so much, bergerkiller!
One slight bug I think: this blocker
should block carts coming from right and send them back to right (or so I think), but the carts stop at the blocker indefinitely.
Also a question: how would I reset the train destination at some point in my track with signs?
-
View User Profile
-
Send Message
Posted Nov 9, 2012@Etsija Here ya go, I wrote a destinations.dat -> text/yaml convertor. Most of the code could be directly copied from TrainCarts, luckily.
https:dl.dropbox.com/u/3681706/TCDestinationsConverter.jar
Double-click it, you do need to have the JRE installed. If all else fails, try to use a batch file (or similar) to open it using java. Just like how you start the MC server.
Source: http:pastie.org/5353886
EDIT
Also do note that if a train has no destination set, the switcher signs won't do anything. If you want to set a default, put this on the switcher sign:
Then the train will be forced left if no destination is set, otherwise the destination system takes over. l can be any type of direction you wish to send no-destination carts to.
-
View User Profile
-
Send Message
Posted Nov 9, 2012@Etsija Weird, looks like another stupid Yaml parsing error. I already had to write a shitton of fixes external of the reader, apparently I should just go and rewrite everything? Anyhow, for now, try a shortcut type with a name other than & ... like $m, @m, _m, |m, /m, \m, +m, >m, <m or you name it. Something should work out...but &m is forbidden by yaml. :/
About the destinations.dat, well I used a YAML saving system before, buuuut...well...it ended up creating files > 20 mb and loading these files took ages, also because neighbouring had to be performed on startup. Right now it saves the node neighbours and also all indirect node neighbours to boost reading time.
I'll write a small Java program to convert the file. The file is unreadable because it has compression AND stores in raw bytes instead of textual. I know the format though, so I can easily make a converter for you.
Also, the final commit for all of the issues is there!!!
-
View User Profile
-
Send Message
Posted Nov 9, 2012I am also experiencing route calculation problems which I think would need some kind of debugging tool to root this out. Your plugin writes the pathfinding data to binary files which are not readable. I fully understand that, but could you make a command to write out the pathfinding data in ASCII form, whatever it is?
I think that would be an excellent way to enable some weird pathfinding problems to get sorted out.
Currently I have this problem: I have a two-way circular test route, where there are some stations. Attached to that "ring", there are some satellite stations, but you should only get to them via specific "/train dest" commands from the main ring. Now, even when a player enters the main ring and doesn't issue any "dest" command, he still ends up to such a station and begins the pendulum movement around the particular station sign, as if a magnet drew him there and doesn't want to let him out.
This is all very weird to explain, due to lacking a common language with which to speak. That is why I feel it would be very beneficial for you to implement the ASCII version of the pathfinding data; that way, I could try and be more specific.
-
View User Profile
-
Send Message
Posted Nov 9, 2012@bergerkiller
Trying your idea about &m (and my extension, &p):
In config.yml,
What am I doing wrong?
-
View User Profile
-
Send Message
Posted Nov 9, 2012It doesn't work in systems that previously work so it's a correct setup.
http://dl.dropbox.com/u/46749435/2012-11-08_23.13.51.png
Simply nothing happens when cart passes, no error messages no nothing. Power state is correct and cart do have the items required in it.
-
View User Profile
-
Send Message
Posted Nov 9, 2012@Etsija You place a blocker sign with [train:east] or you simply place a blocker sign with [train] and make sure it faces to the direction of the crossing. Path finding will actually spot blocker signs far away in the future to ignore those routines, it is not that it will reach the crossing and then decide 'oh, I can't go there'. That would be a bit silly for a path finding.
You can add message shortcuts in the config.yml. For example, you can add '&m' as a shortcut for your '&6[METRO]' message like this:
@SnyTe Don't worry, I will look into it as soon as possible. I do have more severe problems to fix first, ones that affect minecart movement and global issues like sign detection. It could very well be your bug is caused by one of these major bugs. Just in case, what exactly doesn't work? Did you place a workbench near the crafter sign?