Inactive [MECH] TrainCarts v1.71.2 - Link minecarts of different types together to form trains [2222]

Discussion in 'Inactive/Unsupported Plugins' started by bergerkiller, Aug 3, 2011.

  1. Offline



    After a request from Marius A. Winsjansen I started to work on linked Minecarts. On the first day I already managed to make multiple carts move with the same speed, but a long list of bugs was to be expected. After fixing lots of bugs, adding lots of (complicated) Minecart handling functions and after hours of testing on my local server, this plugin is finally ready for a stable release! :D

    Also, special thanks go to @Shamebot for helping me out several times. :)

    For a lot of information about TrainCarts see the WIKI page!

    Configuration and permissions

    All configuration nodes can be found in config.yml and contains a description with it. Permissions can be found in PermissionDefaults.yml, combined with a description.


    Early development video (Photobucket)

    Video displaying version 0.6 of this plugin (YouTube)

    Video displaying version 1.0 of this plugin (YouTube)

    Video displaying version 1.1 of this plugin (YouTube)

    Video displaying version 1.2 of this plugin (holy...)

    A tutorial video in German explaining various sign-circuitry of TrainCarts

    PhotoBucket Sign system tutorial videos (also linked in the WIKI pages)
    Train spawner / Stations / Stations2 / Arrival signs / Train teleportation / Track switcher based on tags / Destinations / Blocker
    Video of how the switcher, station and destination signs work together

    Side information:

    It works best on straight lines with not too much elevation changes followed up by sharp corners. As long the cart gap can be adjusted, everything goes fine. It had some collision issues in the past, but I fixed all of that by manipulating the actual Minecraft server native code. I added links in the source where this was appropriate. Sharp 'U'-turns cause individual carts to lose perceptive of their direction. Keep at least one piece of track in between corner sections! Trains are stored on-disk when reloading and stopping the server, so expect trains to be there when you return.

    Important when updating: do one reload to save all trains, then replace traincarts.jar, and then do another reload. This next reload will probably cause a noClassDefFound exception (since the old jar got replaced), this is why a pre-reload is required. Replacing the jar without reloading is a very bad idea: it will cause a lot of runtime exceptions. Best is of course to stop the server and start again, but this is not always possible.

    This plugin is made compatible with Minecart Mania. If you notice a certain feature of Minecart Mania is not compatible with TrainCarts, notify me and I'll fix it. :)

    Known bugs:
    - None.

    - Train-sign message handling using SignLink (low priority)
    - Minecart use permissions (for individual carts?) such as Storage Minecarts


    If you encountered a bug, post exactly what you had done and in what order. Even a slight wobble can help fixing bugs. When posting (long) errors I recommend you to post everything, don't cut it off. I work with native methods, so in my case these lines are important. For comments on the media content see YouTube, it also contains a description with the music name when music is used.

    Bug reporting (extend)

    1. Post the Craftbukkit version you are using (the first info message in the console)
    2. Post the log from where the first plugin gets enabled to the 'done'.
    3. Post possible errors in this log too (don't cut them short)
    4. No error? Still post the log. Also explain how I can reproduce it, you can use screenshots
    5. Before reporting, remove ALL plugins other than TrainCarts and try again. If it works then, find out what plugin is interfering and post that here. I can add support.
    6. ALWAYS use the latest recommended Craftbukkit build with this, or my methods may just fail because of renamed functions.

    Important links:

    Request thread
    TrainCarts on BukkitDev for download and more
    TrainCarts source and more on GitHub
    TrainCartsBlocks add-on source and more on GitHub
    SignLink Bukkit page (required to use Arrival signs)
    MyWorlds Bukkit page (required to use Portal train teleportation)

    notice: try to keep SignLink/MyWorlds up-to-date to prevent compatibility issues.

    Installation for those that don't know how

    1. Download and install the latest craftbukkit version
    2. Download the latest TrainCarts version
    3. ^ Save the archive (zip file) to your computer
    4. ^ Open the archive you just downloaded
    5. In the folder your server sits in, create the plugins folder if it doesn't exist
    6. Open the plugins folder
    7. Move the TrainCarts.jar file found in the archive into the plugins folder
    8. Run your craftbukkit server and look in the console/log for possible errors, and/or if the plugin is enabled.


    Show your appreciation for my plugins by donating
  2. Offline


    Many thanks, I use the default maxcartspeed setting to slow the carts way down, I use 0.10 so they dont fly across the map.

    I use them as freight trains from mine area to mine area. Many thanks for this Mod.
  3. Offline


    Also, I got a 1.8 version of signlink and traincarts that works, but don't really feel like publishing it for a not-recommended build yet...if someone requests it I'll upload it to mediafire.
  4. Offline


    @Thulinma ok added a link in the main page. :)
  5. Very nice, seems to work without issues so far for me. Will let you know if I find any problems. :)

    EDIT: Error while unloading in 1118:
    20:04:22 [SEVERE] Error occurred while disabling Train Carts v1.34 (Is it up to date?): null
    at org.bukkit.plugin.SimplePluginManager.disablePlugin(
    at org.bukkit.plugin.SimplePluginManager.disablePlugins(
    at org.bukkit.craftbukkit.CraftServer.disablePlugins(
    at net.minecraft.server.MinecraftServer.stop(
    (noticed when updating to 1121, but that's probably not related)

    EDIT: When destroying a minecart in 1121:
    java.lang.NoSuchMethodError: net.minecraft.server.DamageSource.a()Lnet/minecraft/server/Entity;
    at net.minecraft.server.EntityHuman.d(
    at net.minecraft.server.NetServerHandler.a(
    at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
    at net.minecraft.server.NetworkManager.b(
    at net.minecraft.server.NetServerHandler.a(
    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    at net.minecraft.server.MinecraftServer.h(
  6. Offline


    Does this mod have trouble on servers where minecarts lag a lot? Because a friend of mine who runs the server does it from a mac mini, and we can have up to 7 people on at once, which causes MASSIVE lag.
  7. Offline


    @catattack998 it depends, but it won't reduce lag that is for sure. All individual minecarts in a train still act as an actual minecart, so if you have lag with 9 minecarts without TrainCarts enabled it will work with TrainCarts, but have the same lag. However, the minecart entity update package is pretty small (basically the location) so I don't expect too much trouble.

    The first error you posted is a line where it stops the train update/cleanup routine. Something must have happened there (exception) to cause this task to halt. Any other errors in 1118 before unloading?

    The second error is a bit weird, my guess is that Craftbukkit got some more changes in there...
    I'll try to keep the 1.8 up to date for the latest successful craftbukkit build. *updated the link for cb 1124*
  8. Nope, no other errors at all during the unload, that's the only one.
    Good luck keeping up with those builds - it's been going fast today! :) I'll try and keep the latest of your plugin running (as long as it doesn't kill my server like it did on the 1121...), if I notice anything weird I'll let you know. More tests is better, right...? ;)
  9. Offline


    MaxSpeed doesn't seem to be working yet.
  10. Offline


    i'm using the 1124 cb with your latest and the spawner only works once until I reload plugins. may be unrelated to your code obviously though..
  11. Offline


    @ecsos it will not spawn a train if there is no room for a train. In other words; remove the previously spawned train (or move it away) to make room for a new spawn command.

    @dockter I'll check it out then...could be that *somewhere* it is still ignoring the setting.
  12. Offline


    Your effort with this plugin is greatly appreciated.
  13. Offline


    well it works now, maybe one of the bukkit updates fixed it or it might have been my fault
  14. Offline


    I remember when I wondering if this was possible with minecarts by default. This will certainly be handy.
  15. About that, I've installed minecraft mania and it seems that it works just fine with it's autocart thing, it stops on stations and then continues unslowed until the next.... can't you use the same method of "soft" propelling on the carts when they're powered by coal ? :p
  16. Offline


    Would anyone say this is pretty safe for a production server?
  17. Offline


    @Digi Yeah in the end I added a 'ignoreForces' boolean property to the group and made the nativeminecartmember access it like this:
        private boolean ignoreForces() {
            MinecartMember mm = (MinecartMember) this;
            return mm.grouped() && mm.getGroup().ignoreForces;
    It now simply ignores external forces (except pushes, different property) when this is true.

    @gameswereus It's not this plugin that can crash your server, but the not-recommended build of craftbukkit is. This plugin can hardly cause a massive spawn of minecarts (you can always stop the server quickly and disable TrainCarts) if it conflicts with something, but I even doubt that to happen. The main issue with the latest build is that 1.8 uses a new Chunk generator. 1.73 worlds become corrupted. (not related to TrainCarts)
    gameswereus likes this.
  18. bergerkiller pretty much already said this, but just to add a second opinion:
    Yes. I've been running the latest for a while now, no problems or crashes at all so far. The earlier unload problem has also not resurfaced - very stable I'd say. :)
    gameswereus likes this.
  19. Offline


    You are genious!!! I've been lookin' for this a long time!
  20. Offline


    Any update to this yet?
  21. Offline


    Been working on NoLagg for a bit...never expected people to like it so badly... :p

    Also, could be I fixed that for the 1.8 version and not for 1.73...yup there we go. :)
  22. Offline


    any chance of getting a feature like this...

    but making trains immune or a clean up command for trains when testing and such, but immune other then that, I like this plugin but with the VehicleZap it would not be possible to make a large train stay, while still being able to clean up the random ones ppl would make.

    Just a thought, made my first station and I am really liking it, just VehicleZap keeps killing them... lol
  23. Offline


    @Sneaky420 That's where the destroy signs can come in handy. Just place it somewhere at the end of the line and it will clean carts (or entire trains) up. Not sure what criteria to match when removing empty carts...when is it allowed?
  24. Offline


    VehicleZap is timer based, and it removes the carts after the set time, I saw the destroy sign, but when lightning is coming from the sky... lol

    Just a thought, cause I like your plugin more then the other, i will just have to get a command driven cart clean up tool rather then a timer
  25. Offline


    i really want to use this plugin but I am running cb #1152

    I get the following error and then my server crashes.
    All of my other 38 plugins are running fine, just this one is crashing the server.
    I am also running Minecartmania without any issues.

    Here is my console error message:
    2011-09-19 18:43:47 [SEVERE] java.lang.NoSuchFieldError: br
    2011-09-19 18:43:47 [SEVERE]     at
    2011-09-19 18:43:47 [SEVERE]     at net.minecraft.server.EntityMinecart.s_(
    2011-09-19 18:43:47 [SEVERE]     at net.minecraft.server.World.entityJoinedWorld(
    2011-09-19 18:43:47 [SEVERE]     at net.minecraft.server.WorldServer.entityJoinedWorld(
    2011-09-19 18:43:47 [SEVERE]     at net.minecraft.server.World.playerJoinedWorld(
    2011-09-19 18:43:47 [SEVERE]     at net.minecraft.server.World.cleanUp(
    2011-09-19 18:43:47 [SEVERE]     at net.minecraft.server.MinecraftServer.h(
    2011-09-19 18:43:47 [SEVERE]     at
    2011-09-19 18:43:47 [SEVERE]     at
    2011-09-19 18:43:47 [SEVERE] Unexpected exception
    java.lang.NoSuchFieldError: br
        at net.minecraft.server.EntityMinecart.s_(
        at net.minecraft.server.World.entityJoinedWorld(
        at net.minecraft.server.WorldServer.entityJoinedWorld(
        at net.minecraft.server.World.playerJoinedWorld(
        at net.minecraft.server.World.cleanUp(
        at net.minecraft.server.MinecraftServer.h(
  26. Offline


    @Omen ugh I don't really feel like exporting a jar for every single version...for now I keep it as the last one until a recommended 1.8 build is out. As I see here the field names (craftbukkit once) changed again, and not really going to reinvent the wheel after every build...

    Tldr; wait for a bit until people find out a 'standard' build to use. You can always download a previous version, it works just fine for me. (not sure what they are changing (??))
  27. Offline


    I had the same problem after updating to MC 1.8, so I updated to the latest dev, and downloaded a new TrainCarts jar from here:
    <Edit by Moderator: Redacted mediafire url>

    This works perfectly for me. See if it would work for you!
    Last edited by a moderator: Nov 13, 2016
  28. Offline

    Celtic Minstrel what? Why is there a TrainCarts jar on MediaFire?
    Omen likes this.
  29. Offline


    Is there a way to remove specific carts from a train? The way our freight system is currently set up we have pistons that push the track sections under carts in the freight dock onto the launch track. Doing this with your mod causes the rest of the carts to freak out and try to follow the first cart onto the second track.
  30. Offline


Share This Page