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 Mar 9, 2013Hey ya, always loved this plugin.
I've been testing the latest stable dev builds of bkcommon and traincarts and while the routeing is working correctly and players get to thier destinations they seem to get some odd bugs:
They'll seem to have been kicked out the cart when in actualy fact are still in it, so a short while down the track they appear in the cart again - but to other players they are always in the cart. Also this leads to some seeming to fall through the map very slowly.
I will say the server has something like 57 plugins (lol - blame the owner), so i'll be doing more extensive testing later on at so see if there might be another plugin clashing thats causing it
-
View User Profile
-
Send Message
Posted Mar 8, 2013I'm having an issue with TrainCarts. It when ever I start up my server it says this:
16:00:19 [INFO] [BKCommonLib] Loading BKCommonLib v1.5 16:00:20 [INFO] [Train Carts] Loading Train Carts v1.72.5 16:00:20 [INFO] [BKCommonLib] Enabling BKCommonLib v1.5 16:00:20 [INFO] [BKCommonLib] BKCommonLib is running on Minecraft v1_4_R1 16:00:20 [INFO] [BKCommonLib] Want fries with that? We have hidden fries in the FoodUtil class. 16:00:20 [INFO] BKCommonLib version 1.5 enabled! (0.11s) 16:00:20 [INFO] Preparing level "world" 16:00:20 [INFO] Preparing start region for level 0 (Seed: 8259697338005007643) 16:00:21 [INFO] Preparing spawn area: 52% 16:00:22 [INFO] Preparing start region for level 1 (Seed: 8259697338005007643) 16:00:22 [INFO] Preparing spawn area: 48% 16:00:23 [INFO] Preparing start region for level 2 (Seed: 8259697338005007643) 16:00:23 [INFO] [Train Carts] Enabling Train Carts v1.72.5 16:00:23 [SEVERE] [Train Carts] An error occurred while enabling, the plugin will be disabled 16:00:23 [SEVERE] [Train Carts] You may have to update Train Carts or look for a newer CraftBukkit build. 16:00:23 [SEVERE] java.lang.NoClassDefFoundError: com/bergerkiller/bukkit/common/BlockSet 16:00:23 [SEVERE] at com.bergerkiller.bukkit.tc.TCListener.<clinit>(TCListener.java:67) 16:00:23 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 16:00:23 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 16:00:23 [SEVERE] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 16:00:23 [SEVERE] at java.lang.reflect.Constructor.newInstance(Constructor.java:513) 16:00:23 [SEVERE] at java.lang.Class.newInstance0(Class.java:357) 16:00:23 [SEVERE] at java.lang.Class.newInstance(Class.java:310) 16:00:23 [SEVERE] at com.bergerkiller.bukkit.common.PluginBase.register(PluginBase.java:212) 16:00:23 [SEVERE] at com.bergerkiller.bukkit.tc.TrainCarts.enable(TrainCarts.java:335) 16:00:23 [SEVERE] at com.bergerkiller.bukkit.common.PluginBase.onEnable(PluginBase.java:636) 16:00:23 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) 16:00:23 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457) 16:00:23 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381) 16:00:23 [SEVERE] at org.bukkit.craftbukkit.v1_4_R1.CraftServer.loadPlugin(CraftServer.java:282) 16:00:23 [SEVERE] at org.bukkit.craftbukkit.v1_4_R1.CraftServer.enablePlugins(CraftServer.java:264) 16:00:23 [SEVERE] at net.minecraft.server.v1_4_R1.MinecraftServer.j(MinecraftServer.java:321) 16:00:23 [SEVERE] at net.minecraft.server.v1_4_R1.MinecraftServer.e(MinecraftServer.java:300) 16:00:23 [SEVERE] at net.minecraft.server.v1_4_R1.MinecraftServer.a(MinecraftServer.java:259) 16:00:23 [SEVERE] ...3 more 16:00:23 [SEVERE] Caused by: java.lang.ClassNotFoundException: com.bergerkiller.bukkit.common.BlockSet 16:00:23 [SEVERE] java.lang.ClassNotFoundException: com.bergerkiller.bukkit.common.BlockSet 16:00:23 [SEVERE] at java.net.URLClassLoader$1.run(URLClassLoader.java:202) 16:00:23 [SEVERE] at java.security.AccessController.doPrivileged(Native Method) 16:00:23 [SEVERE] at java.net.URLClassLoader.findClass(URLClassLoader.java:190) 16:00:23 [SEVERE] at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:80) 16:00:23 [SEVERE] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53) 16:00:23 [SEVERE] at java.lang.ClassLoader.loadClass(ClassLoader.java:306) 16:00:23 [SEVERE] at java.lang.ClassLoader.loadClass(ClassLoader.java:247) 16:00:23 [SEVERE] at com.bergerkiller.bukkit.tc.TCListener.<clinit>(TCListener.java:67) 16:00:23 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 16:00:23 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 16:00:23 [SEVERE] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 16:00:23 [SEVERE] at java.lang.reflect.Constructor.newInstance(Constructor.java:513) 16:00:23 [SEVERE] at java.lang.Class.newInstance0(Class.java:357) 16:00:23 [SEVERE] at java.lang.Class.newInstance(Class.java:310) 16:00:23 [SEVERE] at com.bergerkiller.bukkit.common.PluginBase.register(PluginBase.java:212) 16:00:23 [SEVERE] at com.bergerkiller.bukkit.tc.TrainCarts.enable(TrainCarts.java:335) 16:00:23 [SEVERE] at com.bergerkiller.bukkit.common.PluginBase.onEnable(PluginBase.java:636) 16:00:23 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) 16:00:23 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457) 16:00:23 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381) 16:00:23 [SEVERE] at org.bukkit.craftbukkit.v1_4_R1.CraftServer.loadPlugin(CraftServer.java:282) 16:00:23 [SEVERE] at org.bukkit.craftbukkit.v1_4_R1.CraftServer.enablePlugins(CraftServer.java:264) 16:00:23 [SEVERE] at net.minecraft.server.v1_4_R1.MinecraftServer.j(MinecraftServer.java:321) 16:00:23 [SEVERE] at net.minecraft.server.v1_4_R1.MinecraftServer.e(MinecraftServer.java:300) 16:00:23 [SEVERE] at net.minecraft.server.v1_4_R1.MinecraftServer.a(MinecraftServer.java:259) 16:00:23 [SEVERE] ...3 more 16:00:23 [INFO] [Train Carts] Disabling Train Carts v1.72.5 16:00:23 [INFO] Train Carts disabled!
It enables then disables TrainCraft and I'm running the latest Minecraft and the latest BKCommon Lib.
-
View User Profile
-
Send Message
Posted Mar 8, 2013@bergerkiller
As it stands now, will it automatically fill more than one chest if there is enough material for it on the train? Or will it still just fill one chest per pass?
How about a hash tag on the second line?
I think that will all fit on one line. The hash tag would apply for the entire sign. Would the all inventories option also apply to collect signs?
You could perhaps use the same format (with different symbols) to add more options if needed later. For example, it would be handy to be able to tell it to fill/empty the closest or farthest chest(s) first.
I realize you are fixing bugs right now, but if you are in the mood for new features, could you make a way to drop items from the train and not have them land on the track? For example, if you wanted an overhead train to drop items below. Currently, the drop radius for transfers to the ground doesn't seem to have an effect.
-
View User Profile
-
Send Message
Posted Mar 8, 2013@CommanderGizmo Oooh I see what the issue is you are having. Not sure how to go about this, as the logic is, simply put, to go by the chest one by one. I guess my best option is to include parameters for on the collect/deposit signs so it will try to go by all inventories one by one and put items in, equally sharing the items. Any preferences for a format?
@the_grox BKCommonLib doesn't support MCPC at all yet, though someone is working on it I believe. There are major differences between CraftBukkit and MCPC, so it is fairly hard to support it. Furthermore, logic some plugins depend on might not even be possible on MCPC.
Whether it will ever support it, I do not know. I do plan on making all plugins use abstract code that is server-implementations independent so more server implementations can be supported at once. But for 1.50, this is not the case yet, it would take too much time.
-
View User Profile
-
Send Message
Posted Mar 7, 2013@bergerkiller
Okay, but what version of BKCommonLib is supported by MCPC? because I tried it with the version available here, and don't work. Also, the BKCommonLib's jenkins is not working for me... =/
-
View User Profile
-
Send Message
Posted Mar 7, 2013@bergerkiller
Thanks, I'll try that. Where is that documented? I can't keep those new options straight.
I just checked my plugin folder, and it have a jar named 'BKCommonLib-1.50-SNAPSHOT.jar' and no other BK related jar file in there. I'm not sure why it would pull the wrong version? I downloaded it from Jenkins and it was the latest version at the time.
I have now downloaded the version from you links below and they had the same filenames and overwrote the previous files in the plugin folders. The train version command says:
9:33:39 PM [INFO] Train Carts v1.72.6 using BKCommonLib v1.5 9:33:39 PM [INFO] Unknown command, for help use /help train
I will test again for the issues I had earlier.
[EDIT] I just tested putting 8_coal on the sign as you suggested, but it still only puts 8 coal into one furnace. What is more, on the next pass, it just puts it into the same furnace. Not only is it slow, but it is ignoring all the other available inventories. This really is a major break to our item production.
-
View User Profile
-
Send Message
Posted Mar 7, 2013oh Bukkit...never change. There will come a time there will be only BKCommonLib imports, and no more Bukkit imports. The more the break the more the API becomes useless...
https:bukkit.atlassian.net/browse/BUKKIT-3341
-
View User Profile
-
Send Message
Posted Mar 6, 2013@the_grox TrainCarts and all other plugins of mine work on MCPC+ automatically once BKCommonLib is supported. It is how it works.
-
View User Profile
-
Send Message
Posted Mar 6, 2013@CommanderGizmo Try using this format I added a while back:
Also, train teleport/elevator is badly broken, I am looking into this. Cause: Bukkit (what a surprise)
-
View User Profile
-
Send Message
Posted Mar 6, 2013I deleted the TC, @bergerkiller
That is very odd. I deleted the TC, BK, and NL jars, then dragged the new the from their download location. Not sure how I got this mixed up. I'll correct it and update my report with more useful data asap. A new medical emergent has cropped up and I'll possibly be out of pocket for a few days.
Sorry for the useless report. I really did think I had double checked that file!
The issue for me with the current depositing setup is with furnaces. I commonly use trains to deposit items to be smelled efficiently. I place 8 of the item per furnace in a wall of furnaces. This smells the item stacks the as quickly as possible. Currently with a random selection of available furnaces, one may get added to on each pass while others go empty. This is not very efficient and looks terrible when one furnace just won't light.
@bergerkiller I was not aware a second setting was required when ejecting mobs some distance away. The cooldown setting sounds quite handy.
-
View User Profile
-
Send Message
Posted Mar 6, 2013hi @bergerkiller, you have in mind to launch a version of TrainCarts for MCPC+? would be something fantastic, but unfortunately the compatibility of BKCommonLib & MCPC + prevents me use this plugin on my server. Thanks in advance! :)
-
View User Profile
-
Send Message
Posted Mar 6, 2013About the mob ejecting sign issue...you do all know that you need to set the mobenter collision mode to 'cancel' or anything else EXCEPT enter before ejecting, right? Because after ejecting the mob will just enter again because of collision.
I'll be putting a configurable mob re-enter delay for now, but this should actually be fixed by the user. :)
-
View User Profile
-
Send Message
Posted Mar 6, 2013@CommanderGizmo I looked at all issues. I solved the issue with player hand items, added constants by default for armor/leggings/sword/etc, but could not reproduce any other issues. Ejector sign worked fine, and no issues with chests/furnaces being ignored in the stack. (it did go by them one by one, so first filling chest #1, then #2, and so on, this is expected behaviour) Same for:
Which leads me to suspect you are using a very outdated BKCommonLib build. In my case /train version shows the right version: 1.5. I recommend updating both TrainCarts and BKCOmmonLib to the latest development build to see what's up.
http:ci.herocraftonline.com/job/BKCommonLib/157/
http:ci.ecocitycraft.com/job/TrainCarts/23/
I do suspect you are suffering from the 'corrupted tile entity' issue that has been neglected for the past years in Minecraft. This is where ghost chests/furnaces stay behind, getting picked up by a plugin. To my surprise there were a lot of these on the world, so I was forced to add more calls to fix it, which is not fully bug-proof.
-
View User Profile
-
Send Message
Posted Mar 6, 2013@bergerkiller
I see you got the standard bukkit reply in that issue, haha. Thanks for sorting out all these little annoyances for us!
A minor update: on more hours of testing, I see that all available inventories are used by transfer signs, but it is quite random. One can get skipped for a long time our may get used far more than the others.
Also, I did have one instance where the following sign mounted on a curve managed to use a chest at a diagonal!
[!train:fb] collect c 7I have no idea how it happened.
-
View User Profile
-
Send Message
Posted Mar 6, 2013@CommanderGizmo Aaah glorious report, I'll get to work on the issues. They don't seem all that hard to fix, and most are probably related to silly bugs that have been long since forgotten.
I was aware of the chunk unload issue, just as I described in this Bukkit issue ticket a long while ago: https://bukkit.atlassian.net/browse/BUKKIT-2848
I really hope Bukkit will just completely deprecate/remove that unloadChunk without safe option, it's completely unsafe to unload chunks without notifying plugins. Data gets lost...
I can respond to it in some way in TrainCarts, but the behaviour is unpredictable. I can only hope that one next unload event of a chunk nearby will trigger the train to unload.
-
View User Profile
-
Send Message
Posted Mar 5, 2013@bergerkiller
Testing Report
I have started testing the latest dev build: TC 1.72.6_#22; BK 1.50_#156; CB 1.4.7-R1.0_#2624. Here is my report.
Confirmed Fixes
The chunks on my server appear to stay loaded all the time without issue. I could find no way to cause any minecarts to glitch with server restarts or chunk (un)loading. See Notes 1 and 2 below
All of my switcher signs seem to be working properly.
Collecting from furnaces no longer generates NPE's, and items are now transferred by the amount given. Logs once again go into the proper slot. WHOOOOT!!!!
The Ejectors now properly read negative numbers again, but there is still one issue (see next section).
Bugs Marked 'Fixed' Still Broken
Using a detector as demonstrated in ticket 118 is still causing NPE's, though it has been marked fixed. See Note 3 below
The Y coordinate does not appear to be reading negative numbers as if it's using zero as a minimum. A sign with the coordinates of -3/-2-/3 does not place the user below the level of the tracks or minecart even though there is empty space available at the given coordinates. The X and Z axis are working with negative numbers though.
Major New Bugs
The train used to find all furnaces within the radius of the sign and fill them all one by one on a single pass. Now it is selecting one furnace and filling just the one on each pass. Further, it is choosing the same one each time. This means that a wall of furnaces (and I assume chests) will only ever have the one used, while also be extremely slow about unloading into the available space.
Miscellaneous Bugs
The version command reports BK as 1.45 and also is followed by the 'unknown command' response after reporting the version info.
Notes
There have been many reports of chunks not loading or staying loaded properly. The somewhat widely used plugin MineBackup has a known and documented issue where it nearly instantly unloads chunks at will without calling the ChunkUnload event. Thus no other plugin has the chance to cancel the action. This caused many of the errors with TC's chunk loading on my server. I haven't had an issue since I completely removed this plugin, even before the dev builds I just tested.
As you may recall, I have a very extensive list of aliases in my setup. One of these includes the word 'sword' This may effect how this statement is evaluated. You can see my current complete list of aliases here if it is helpful.
The current stable release of CB 1.4.7-R1.0 (Build 2624) has a bug in it which causes redstone to be unloaded before the chunk it is in. It would seem that this unloading of the redstone is not always cancelled when the chunk unload is aborted. I have noted that on my server chunks with redstone running which an unload event is triggered often have the redstone frozen when I return. This includes wires, torches, and repeaters separately. This is not a TC bug! I have tested this for hours and furnaces continue to smelt and items continue to be transferred while no one is logged in. However, the redstone does freeze at the moment the unload event was triggered. This can effect track layouts that rely on detectors or other redstone triggers. Again: The chunks are staying loaded, but the redstone is not. This is a CB/MC bug, not a TC issue.
-
View User Profile
-
Send Message
Posted Mar 5, 2013@VoRoN96
The giant image above that starts "This Plugin Requires" might prove useful...
-
View User Profile
-
Send Message
Posted Mar 5, 2013Have a troubles.
Bukkit 1.4.7-R1.0
2013-03-04 20:52:39 [SEVERE] Could not load 'plugins\TrainCarts.jar' in folder 'plugins' org.bukkit.plugin.UnknownDependencyException: BKCommonLib at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:195) at org.bukkit.craftbukkit.v1_4_R1.CraftServer.loadPlugins(CraftServer.java:239) at org.bukkit.craftbukkit.v1_4_R1.CraftServer.reload(CraftServer.java:594) at org.bukkit.Bukkit.reload(Bukkit.java:184) at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:186) at org.bukkit.craftbukkit.v1_4_R1.CraftServer.dispatchCommand(CraftServer.java:514) at net.minecraft.server.v1_4_R1.PlayerConnection.handleCommand(PlayerConnection.java:980) at net.minecraft.server.v1_4_R1.PlayerConnection.chat(PlayerConnection.java:898) at net.minecraft.server.v1_4_R1.PlayerConnection.a(PlayerConnection.java:853) at net.minecraft.server.v1_4_R1.Packet3Chat.handle(Packet3Chat.java:44) at net.minecraft.server.v1_4_R1.NetworkManager.b(NetworkManager.java:290) at net.minecraft.server.v1_4_R1.PlayerConnection.d(PlayerConnection.java:113) at net.minecraft.server.v1_4_R1.ServerConnection.b(SourceFile:39) at net.minecraft.server.v1_4_R1.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.v1_4_R1.MinecraftServer.r(MinecraftServer.java:598) at net.minecraft.server.v1_4_R1.DedicatedServer.r(DedicatedServer.java:224) at net.minecraft.server.v1_4_R1.MinecraftServer.q(MinecraftServer.java:494) at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:427) at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)
-
View User Profile
-
Send Message
Posted Mar 5, 2013@CommanderGizmo Use the latest development build found on the CI (Jenkins) build server, see the image link all below the main page. Use this in combination with the latest development build of BKCommonLib on CraftBukkit 1.4.7 R1.0.
-
View User Profile
-
Send Message
Posted Mar 5, 2013@bergerkiller
You asked me to test out one of the functions in a ticket comment. The top of this page shows that the bukkit dev builds are broken. Could you advise which dev build of CB and your plugin I should test on my production server?
Thanks!