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 4, 2012@bergerkiller
Tested it, not any better.
a waiter before a switch does not work at all.
What have changed since previous version is: it now does not wait at all.
Previously, it was detecting occupyed track after the switch, but it then kept stuck.
-
View User Profile
-
Send Message
Posted Nov 4, 2012Hi bergerkiller,
Please try the test version 2 of 1.72.1.
done and works fine! Thank you! :D I was able to reproduce the bug from Doompants409. Could you please also upload the newest Version again to your GitHub download page mentioned above.
Greetings, iKoze
-
View User Profile
-
Send Message
Posted Nov 4, 2012@Bergerkiller
I was experiencing switcher problems too, so I've tested 1.72.1 Test2 this morning (as well as updated library, and bukkit 1.4.2-R0.2)
The good news is that the switcher bugs seem to all be working again. My rail network relies heavily on ph@ -controlled switching, and that part is all working well now.
The problem I am see now though is that there is a MAJOR slowdown to the train in complicated (zig-zag) turns, and when ever passing through a 3- or 4-way junction that is not controlled by switchers. For example (best I can illustrate):
A train travelling SOUTH to NORTH will pass through this junction without problem:
║
║══
║
While a train travelling SOUTH to NORTH will see extreme reduction of speed as it hits this junction (and continues north)
║
╚══
║
Further, I have several areas of my track that for aesthetic reasons have long, slow turns instead of sharp 90 degree turns.. These also slow, and even stop the trains. (There are no blocks beside the tracks to slow the carts.. only the turns themselves).
ie:
░░░░░╔ ═════════
░░░╔═╝
░░╔╝
░╔╝
░║
╔╝
║
║
I did not notice this problem prior to Test 2, however that's not to say I didn't simply miss it because of the greater problem with switches. I do not think it is a problem with 1.4.2 itself though, because removing the Traincarts mod allows for a 'train' of carts pushed by a powered cart to path through the trouble sections of track without any problems.
Really hope that helps you hunt this down. Great work as always! This is fast becoming one of our favorite mods.
-
View User Profile
-
Send Message
Posted Nov 4, 2012@Lorenzorota Install BKCommonLib v1.34/1.33.
@leagris @iKoze Please try the test version 2 of 1.72.1. I fixed all directionale issues that were happening, switcher signs/destinations work again, blocker sign functions again, several other bugfixes regarding random reversing, stopping or freezing of carts and fixed regarding redstone power reading.
https:dl.dropbox.com/u/3681706/TrainCarts%20v1.72.1%20TEST2.zip
-
View User Profile
-
Send Message
Posted Nov 4, 2012Waiter sign bug
Hello,
Waiter sign in Version 1.72.0 does not work as expected.
Reproduce:
While the second train reach the waiter sign, it stops (good as there is a train occupying the forward tracks section).
While the first train leave the dead-end to re-enter the loop (then freeing the track section), the second train does not move-on.
If the first train is removed/destroyed, then the second train move-on.
Expected behaviour:
The second train should move-on as soon as the first train leave the occupied section.
Probable causes:
-
View User Profile
-
Send Message
Posted Nov 4, 2012>What does this mean?
12:25:55 [SEVERE] org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: Could not initialize class com.bergerkiller.bukkit.tc.TrainCarts 12:25:55 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:154) 12:25:55 [SEVERE] at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305) 12:25:55 [SEVERE] at net.skycraftmc.PluginManager.PluginControl.loadPlugin(PluginControl.java:72) 12:25:55 [SEVERE] at net.skycraftmc.PluginManager.PluginManagerPlugin.onCommand(PluginManagerPlugin.java:206) 12:25:55 [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) 12:25:55 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:185) 12:25:55 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:504) 12:25:55 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchServerCommand(CraftServer.java:496) 12:25:55 [SEVERE] at net.minecraft.server.DedicatedServer.al(DedicatedServer.java:251) 12:25:55 [SEVERE] at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:216) 12:25:55 [SEVERE] at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:486) 12:25:55 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:419) 12:25:55 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:818) 12:25:55 [SEVERE] Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.bergerkiller.bukkit.tc.TrainCarts 12:25:55 [SEVERE] at java.lang.Class.forName0(Native Method) 12:25:55 [SEVERE] at java.lang.Class.forName(Class.java:264) 12:25:55 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:143) 12:25:55 [SEVERE] ... 12 more 12:25:55 [INFO] Failed to load TrainCarts!
-
View User Profile
-
Send Message
Posted Nov 3, 2012@iKoze It wasn't that the destinations were broken, the switching was broken...severely. I still didn't manage to completely fix it. There is a part of logic that is reversing the minecart when it shouldn't...this happens right when the tracks are switched.
-
View User Profile
-
Send Message
Posted Nov 3, 2012@iKoze Unfortunately I can't properly do it on another thread, because the plugin has to load (new) chunks to navigate along the track paths. All I can do is try and optimize the track iterator so that it can execute the logic faster. Unfortunately you will always have this problem of massive lag when a really big rail system needs recalculation. Try to avoid the /train reroute command as much as possible, the plugin should remove path finding nodes automatically when you destroy the rails or sign of a switcher node.
I will look at the destination problems you are having and see to it getting fixed.
-
View User Profile
-
Send Message
Posted Nov 3, 2012Hi bergerkiller,
Reason that destinations don't work is that the sign facing reading thing was very broken. I uploaded a test version for 1.72.1 here which should work without problems except that minecarts don't collide vertically properly.
just downloaded and tested it with BKCommonLib 1.33 and CraftBukkit 1.4.2 R0.2 Beta... Doesn't work for me. No errors are shown in the console. It seems as only the first time the train is directed successfully.
The following is less important,... Just if you have time ;)
There is also a bug annoying me for a longer time. We've build a complex and *BIG* rail network on our server. (See http://minecraft.floriware.eu/overviewer (klick on Signs: "Train Carts Schilder")) If you issue a /train reroute and then a train without destination set is moving onto a train switcher, the whole server hangs up for several minutes. This also happens, if you travel to new destinations never used bevore.
I think this is caused, because "the routing thing" happens actually in the server-tick when the train enters the switcher.
I would suggest, that you do the routing thing in a seperate thread and give a message to the player if the routing is done, so he could start travelling. (Like Navigation Systems for cars "calculating route... Please wait" ;) )
-
View User Profile
-
Send Message
Posted Nov 3, 2012@Dinastya Been too busy fixing bugs in TrainCarts, a lot of bugs arose from the ashes of the old buggy code that was used. Refreshing it was needed, but it caused some new bugs to occur, which is expected when you rewrite logic. I think the best solution to fix the teleport thing is to add a fall-back portal system inside TrainCarts that doesn't use MyWorlds. I will call it [train] teleport to keep things simple, but building it takes time. (I think I'll just copy the system used in MyWorlds, as it is most reliable)
@rcth Lol thanks for spotting that bug, stuff like this happens when you copy-over the code from one sign to the other. I'll fix that up real quick.
Reason that destinations don't work is that the sign facing reading thing was very broken. I uploaded a test version for 1.72.1 here which should work without problems except that minecarts don't collide vertically properly. (they just end up merging together...)
https:dl.dropbox.com/u/3681706/TrainCarts%20v1.72.1%20TEST1.zip
Please let me know how well it works and if you spot any bugs. There were a lot of them recently, so don't hesitate to report even the smallest glitches.
-
View User Profile
-
Send Message
Posted Nov 3, 2012in Version 1.72.0 is the AutoPathFinding broken! Please fix it.
-
View User Profile
-
Send Message
Posted Nov 3, 2012You built a train destructor! This sing can play an effect in all minecarts of the train.
Wait, an effect sign is a destructor :O
Oh, and destinations aren't working anymore.
-
View User Profile
-
Send Message
Posted Nov 1, 2012Still no news about the teleport without myworlds?
-
View User Profile
-
Send Message
Posted Oct 31, 2012@Neokiroshan It's a client bug, turn client music on and it won't happen. Will get fixed by Mojang.
@iBaer Mhh I'll look into this. I will have to add additional checks somewhere to stop movement of a minecart if it collides with another minecart. This is something that should be working, yes.
-
View User Profile
-
Send Message
Posted Oct 31, 2012Hey, is there a solution for carts landing into each other instead of on top of each other (when they fall down I mean)?
-
View User Profile
-
Send Message
Posted Oct 31, 2012Hi i've a little bug, when a train is destroy, the sound (of the minecart) continue for a moment. Do you knew that Bergerkiller ?
-
View User Profile
-
Send Message
Posted Oct 30, 2012@roughcut33 Can you explain in a bit more detail? Can't really tell from your post what you are requesting, or what bug needs fixing. If this is about vertical rail signs, they will have some fixes in the next version.
-
View User Profile
-
Send Message
Posted Oct 30, 2012@bergerkiller: sorry it dont works. The trains will always go right of the sign
I need a possibility to ignore station signs if they are inverted or not and if they are powered or not.
-
View User Profile
-
Send Message
Posted Oct 30, 2012Hi, i've just updated TrainCarts 1.72 and BKCommLib 1.33, i'm running on build 2420 and i'm getting that http://pastie.org/5136369 when i launch my server.
Thx for your job.
EDIT: IGNORE IT, I was running with BKcommLib 1.32 FAIL
-
View User Profile
-
Send Message
Posted Oct 29, 2012v1.4 compatible version can be found here:
http:dev.bukkit.org/server-mods/traincarts/files/53-v1-72-0/