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


    I with my friends trying to fix stations and implement some restricktions to signs, can you please tell us where station section of code located ?
  3. Offline


    MechanID Don't worry about it, I am currently working on it. Stations are pretty much fixed now. It also no longer separates trains when a player stands in between two carts. I am now working on improving the teleport coding, to make it retain the train instead of respawning it. It works really well, it sometimes loses sight of the signs and that is a problem.


    Teleportation is working, except cross-world. Has some issues with passengers.
  4. Offline


    Is there a beta version that has some stability for 1.1 yet?

    On another thing, ever think of adding something to allow you to control a powered cart from any place in the train linkage?
  5. Offline


    kinkinhood Um well Thulinma told me his version still contained some bugs, most of them I am now squashing. Expect a stable build in a few minutes or hours (I'll go out of beta then).

    I was going to, but it's a bit hard to implement it with permissions. If everyone in the train can do that, things get rather messy. What did you have in mind? Things I think of now:
    The third is a bit doubtful, as that can cause some odd things to happen if owners don't know about it.
  6. Offline


    Perhaps have something that made it so activate one powered cart the others activate(so say you could have a train of 6 carts, 3 up front being powered carts with a chest cart behind them to carry spare coal, and then one before the last cart, then you could sit in the last cart and turn on the one infront of you and it'd turn on the 3 up front as well). I'd think that'd help prevent permissions issues as well as theoretically you could put a powered cart on both sides of you and use that to control which direction you go. (perhaps use an powered cart with no coal in it to act as the controller cart)
  7. Offline


    kinkinhood ah I see, can easily be done though. It is actually a fix, since right now trains are 'pulled apart'. Instead I'll add some checks so it will update all other powered minecarts to go the direction the player requested. (can be hard or easy, depends)

    However, won't fill other carts than the player clicked, as that can cause unpredictable behaviour.
  8. Offline


    Alright. The entire thing is rather awesome. I actually use this and plgbooster and it makes building big complex train systems awesome and you can get rather creative with it. Biggest challenge is making 2 rail changeovers
  9. Offline


    bergerkiller Will the stable release for 1.1.0 be done tonight?
  10. Offline


    i have small request: my users love to abuse "eject" sign to make lifts and tekeporters, can this be limited simehow to fixed range 3-5 blocks ?
  11. Offline


  12. Offline


  13. Offline


    on my test server one of my players fixed station issue(post 1408) in players way, i was impressed and i think you need to look at this :)
  14. Offline


  15. Offline


    Swimo sorry got distracted by NoLagg again, peeps having the usual problems :/

    I'll finish off a beta right now, while performing a quick check for issues. Will schedule the player enter for now...
  16. Offline


    Thanks bergerkiller, let me know when it's done.
  17. Offline


    I just donate a little... I love trains from the childhood, and realy want to see them on my 1.1 server =) Best wishes from Russia, Irmo... =)
    bergerkiller likes this.
  18. Offline


    Russia eh? What part?
  19. Offline


    Karelia, North-West, right near Finland.... But it is realy offtop =)
  20. Offline


    bergerkiller Sorry to keep bugging you! If it can be done within the next couple of hours would be great as I plan on launching my public server today and I want to setup the train network properly first.
  21. Offline


    AlexxNB Thanks, from the Netherlands here :)

    Swimo ok possible, but won't have the powered cart feature yet. Uploading it now...


    See TrainCarts 1.6 beta 10 for CB 1795 on GitHub. (older/newer CB versions work as well I guess, to some extend)
    If you spot any bug, feel free to report it.
  22. Offline


    So.... It's work with 1796 =) Thank you! It is look like I'll not sleep tonight - railways, trains... ooohhhh...
  23. Offline


    The beta seems to be running pretty well so far. Having issues with 1 of my destinations, though I'm checking to see if the destination sign may have gotten destroyed
  24. Offline


    Note: The NPE occuring in 'isHeadingToTrack' in the VEHICLE COLLISION event is not severe and I know of it just now. You can ignore it if it occurs.


    Yes Thulinma told me he had some sort of 90-degree switch issue when CB got updated. I haven't noticed it so far, but this means it is present.
  25. Offline


    wtf?!? i cant use this plugin! it keeps crashing my server! why?
    here is the report i got

    174 recipes
    27 achievements
    19:17:17 [INFO] Starting minecraft server version 1.1
    19:17:17 [INFO] Loading properties
    19:17:17 [INFO] Starting Minecraft server on
    19:17:17 [WARNING] The server will make no attempt to authenticate usernames. Be
    19:17:17 [WARNING] While this makes the game possible to play without internet a
    ccess, it also opens up the ability for hackers to connect with any username the
    y choose.
    19:17:17 [WARNING] To change this, set "online-mode" to "true" in the
    perties file.
    19:17:18 [INFO] This server is running Craftbukkit version git-Bukkit-1.0.1-R1-3
    7-g3733c54-b1714jnks (MC: 1.1) (Implementing API version 1.1-R1-SNAPSHOT)
    19:17:18 [INFO] Preparing level "world"
    19:17:18 [INFO] Default game type: 0
    19:17:18 [INFO] Preparing start region for level 0 (Seed: -6875674108474067131)
    19:17:19 [INFO] Preparing start region for level 1 (Seed: -6875674108474067131)
    19:17:19 [INFO] Preparing spawn area: 3%
    19:17:20 [INFO] Preparing start region for level 2 (Seed: -6875674108474067131)
    19:17:20 [INFO] Preparing spawn area: 97%
    19:17:20 [INFO] [TrainCarts] 1 Train has been loaded in 1 world. (1 Minecart)
    19:17:20 [INFO] [TrainCarts] version 1.54 is enabled!
    19:17:20 [INFO] Server permissions file permissions.yml is empty, ignoring it
    19:17:20 [INFO] Done (2.368s)! For help, type "help" or "?"
    19:17:24 [INFO] masterkiller592 [/] logged in with entity id 91
    at ([world] 649.5, 63.69999998807907, -72.5625)
    19:17:25 [SEVERE] java.lang.NoSuchFieldError: bN
    19:17:25 [SEVERE] at
    19:17:25 [SEVERE] at net.minecraft.server.EntityMinecart.y_(EntityMinecart
    19:17:25 [SEVERE] at net.minecraft.server.World.entityJoinedWorld(World.ja
    19:17:25 [SEVERE] at net.minecraft.server.WorldServer.entityJoinedWorld(Wo
    19:17:25 [SEVERE] at net.minecraft.server.World.playerJoinedWorld(World.ja
    19:17:25 [SEVERE] at net.minecraft.server.World.tickEntities(
    19:17:25 [SEVERE] at net.minecraft.server.MinecraftServer.w(MinecraftServe
    19:17:25 [SEVERE] at
    19:17:25 [SEVERE] at
    19:17:25 [SEVERE] Unexpected exception
    java.lang.NoSuchFieldError: bN
    at net.minecraft.server.EntityMinecart.y_(
    at net.minecraft.server.World.entityJoinedWorld(
    at net.minecraft.server.WorldServer.entityJoinedWorld(
    at net.minecraft.server.World.playerJoinedWorld(
    at net.minecraft.server.World.tickEntities(
    at net.minecraft.server.MinecraftServer.w(

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jul 14, 2016
  26. Offline


    masterkiller592 update your craftbukkit versin, you have 1714, you need 1795 or after 1781 or so.
  27. Offline


    Thanks for the release... looks like all so far is working. Quick question though (I haven't test it yet though), but can you make a configurable option to force people to enter (or exit) a cart only at a station? I'm going to try to force players to use the stations that i've set up.
  28. Offline


    I seem to have 1 station that for the life of me won't launch a cart. I'm not showing any errors in the log file.

    Alright, so it seems that if you toss a second cart at that same station when one is sitting at it it'll force the cart to go

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jul 14, 2016
  29. Offline


    kinkinhood, if you restart your server, does it retain your trains? or are the deleted? I thought there use to be a setting in the configuration to keep your trains or something of that nature. I no longer see anything like that.

    Mine are being deleted when restarting server.
  30. Offline


    I've set push out players, mobs and misc(train info confirm that), but players still stoping the train. Mobs are pushed correctly....
  31. Offline


    AlexxNB owners can still push the train around, you can disable this behaviour in the configuration. Push away players only apply to players that don't own the cart. (else it would be impossible to stop a train)

    saki2fifty it does load and save the trains yes, I'll check if this is bugged.

    kinkinhood Time to re-check I guess...


    Stations work 100% fine here...sow:
    - what TrainCarts version did you use and what CB build?
    - what type of station did you make
    - screenshot or video?
    - can I join to see for myself if that's possible?

Share This Page