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


    come chill an test stuff just put the V 1.28 on join me im board :p
  3. Offline


    Very nice!
  4. Offline


    Heya Narrow! Traincart + your dropchest plugin = MAGIC!

    narrowtux likes this.
  5. Offline


    Still same problem:
    2011-09-01 17:51:02 [SEVERE] java.lang.NullPointerException
    2011-09-01 17:51:02 [SEVERE]     at
    2011-09-01 17:51:02 [SEVERE]     at$
    2011-09-01 17:51:02 [SEVERE]     at
    2011-09-01 17:51:02 [SEVERE]     at Source)
    2011-09-01 17:51:02 [SEVERE] java.lang.NullPointerException
    2011-09-01 17:51:02 [SEVERE]     at
    2011-09-01 17:51:02 [SEVERE]     at$
    2011-09-01 17:51:02 [SEVERE]     at
    2011-09-01 17:51:02 [SEVERE]     at Source)
    2011-09-01 17:51:02 [SEVERE] java.lang.NullPointerException
    2011-09-01 17:51:02 [SEVERE]     at
    2011-09-01 17:51:02 [SEVERE]     at$
    2011-09-01 17:51:02 [SEVERE]     at
    2011-09-01 17:51:02 [SEVERE]     at Source)
    2011-09-01 17:51:02 [SEVERE] java.lang.NullPointerException
    2011-09-01 17:51:02 [SEVERE]     at
    2011-09-01 17:51:02 [SEVERE]     at$
    2011-09-01 17:51:02 [SEVERE]     at
    2011-09-01 17:51:02 [SEVERE]     at Source)
    2011-09-01 17:51:03 [SEVERE] java.lang.NullPointerException
    2011-09-01 17:51:03 [SEVERE]     at
    2011-09-01 17:51:03 [SEVERE]     at$
    2011-09-01 17:51:03 [SEVERE]     at
    2011-09-01 17:51:03 [SEVERE]     at Source)
    2011-09-01 17:51:03 [SEVERE] java.lang.NullPointerException
    2011-09-01 17:51:03 [SEVERE]     at
    2011-09-01 17:51:03 [SEVERE]     at$
    2011-09-01 17:51:03 [SEVERE]     at
    2011-09-01 17:51:03 [SEVERE]     at Source)
    2011-09-01 17:51:03 [SEVERE] java.lang.NullPointerException
    2011-09-01 17:51:03 [SEVERE]     at
    2011-09-01 17:51:03 [SEVERE]     at$
    2011-09-01 17:51:03 [SEVERE]     at
    2011-09-01 17:51:03 [SEVERE]     at Source)
    2011-09-01 17:51:03 [SEVERE] java.lang.NullPointerException
    2011-09-01 17:51:03 [SEVERE]     at
    2011-09-01 17:51:03 [SEVERE]     at$
    2011-09-01 17:51:03 [SEVERE]     at
    2011-09-01 17:51:03 [SEVERE]     at Source)
    2011-09-01 17:51:29 [INFO] AUTDomiStyle: Set time to 0
    2011-09-01 17:52:00 [SEVERE] java.lang.NullPointerException
    2011-09-01 17:52:00 [SEVERE]     at
    2011-09-01 17:52:00 [SEVERE]     at$
    2011-09-01 17:52:00 [SEVERE]     at
    2011-09-01 17:52:00 [SEVERE]     at Source)
    2011-09-01 17:52:01 [SEVERE] java.lang.NullPointerException
    2011-09-01 17:52:01 [SEVERE]     at
    2011-09-01 17:52:01 [SEVERE]     at$
    2011-09-01 17:52:01 [SEVERE]     at
    2011-09-01 17:52:01 [SEVERE]     at Source)
  6. Offline


    @DomiStyle aah thanks. now I can fix that. Forgot that a Minecart Member could have no group, so when you unlink during the group update it will find a null there. (this is why I don't release 1.28 yet, these things can happen)
  7. Offline


    I am really looking forward to revamping my subway network with your plugin!
  8. Offline


    @mze9412 I am currently implementing a complete new plugin: 'SignLink'. I already got it to the stage that it can display a huge line on multiple signs. It will allow the use of ticker systems (already got that 80% working), variable display, custom messages, 15 colored characters (ignores char limit per sign) and above it all, it is virtual. This means all 'variables' (%variable%) remain on the signs, but the clients will see the value of this sign instead. It is pretty amazing to say the least. :)
  9. Offline


    That sounds also very interesting ^^
  10. Offline


    Heya Bergerkiller!

    Last debug version, our crashes seem to be gone!!!

    However, I have a question. Is the "push mobs out of the way" feature gone in that version? Trains are now getting stopped on the track by spiders and such.

    Thanks, bud!

  11. Offline


    @Aox it shouldn't be, did you check the config.yml to see if it is enabled? (It is disabled by default)
  12. Offline


    Yeah I sure did. It appears that mob pushing and item pushing are both no longer workin for me with the latest debug 1.28. Instead of pushing the mob off the track, it's stopping the train or sending it backwards, same with items.

    Here it is:

    removeDerailedCarts: true
        cartDistance: 1.5
        cartDistanceForcer: 0.1
    use: true
    maxCartDistance: 4.0
    spawnItemDrops: true
    keepChunksLoaded: true
        cartDistance: 1.6
        cartDistanceForcer: 0.2
    maxCartSpeed: 0.3
        z: 0.0
        y: 0.0
        x: 0.0
    breakCombinedCarts: false
        pushPlayers: false
        pushMobs: true
        atVelocity: 0.1
        pushMisc: true
        force: 0.5
        pushPlayer: false
    poweredCartBoost: 0.1
    nearCartDistanceFactor: 1.4
    useCoalFromStorageCart: false
    Am I missing anything?

    I'll load up the old 1.28 you gave me to fix the crash and see if the item pushing is working on that version.


    BK, it's confirmed, the previous 1.28 debug you gave me pushes items/mobs off the track. Here's my experiment:

    1.28A (version give to me to fix crashing)
    Spawn train, go up the track, throw dirt blocks all over the track.
    Head back to train and get in, hit launch button.
    Train launches, heads up track
    hits dirt blocks, sends dirt blocks flying
    stop train, put train back in station
    stop server, swap jars

    1.28B (recent public debug version)
    Same train, go back up track, again, throw dirt all over
    head back to train, get in hit launch
    trian launches, heads up track.
    hits dirt blocks, blocks stay on the track
    entire train halts



    Oh, one other feature of the latest version, my trains, when spawned with the sign, sometimes spawn as all individual minecarts, and I have to link them manually.

    On this last restart, when I came back into the server, the pre-existing, already-spawned train was all individual carts, and had to be reassembled again as well. No big deal, as you just push on the lead cart, but it seems that the train loading code has gotten kind of flaky.


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 18, 2016
  13. Offline


    @Aox that could have to do with swapping the jar while the server runs, but not sure. I'll re-upload a latest version, could contain some weird stuff I forgot to remove, please ignore that. xd

    <Edit by Moderator: Redacted mediafire url>
    Last edited by a moderator: Nov 13, 2016
  14. Offline


    Last edited by a moderator: Nov 13, 2016
  15. Offline


    Sadly the MCM "support" is not really a support.
    The trains really ignore most of the Minecart Mania commands via signs and blocks and takes quite away the possibilities of Minecart Mania but it seems you are working on it.
    Will test the new 0.28 soon and check for more errors.
  16. Offline


    Hows this working along side minecraft mania ?, Its very impressive indeed tho.
  17. Offline


    Some things are simply unimplementable, like the station block, that is why I made my own which has 500% more features so no one can complain. :)
    And yeah, since I use a custom maximum speed it is not really possible to use the speed change signs; it automatically travels at the highest speed. It does work at higher speeds, but derailment happens. :)

    Other than velocity signs, what features fail under TC?
  18. Offline


    Elevator signs hurt you since you go up while you still follow the rails, so you "drive" into the ground.
    Reverse blocks don't reverse the trains.
    Brake/Booster blocks don't change the speed of the trains.
    Didn't test everything yet so there may be more.

    An idea to temporary emulate the reverse blocks:
    Make the trains get the redstone status at a station sign all the time.
    At the moment the station signs needs to be powered at both sides first and the cart needs to stop first before you can choose a direction.
    If they would accept the direction given by the redstone all the time you could use it just as the reverse blocks.
    Hope you know what I mean. :D
  19. Offline

    Celtic Minstrel

    Trains push mobs? Does that interfere with them picking up mobs?
  20. Maybe you can replace the MCM - Features in the next time through your own ;-)
    Is it possible to set "speed signals" so the train travels slower at a specific location?
    What about creating a connection to iconomy, so the user has to pay if he travels with the train?
    Or the user has to have a specific item in inventory as a kind of "ticket", that he has to buy before ;-)
  21. Offline


    Maybe he could just add an intergration for MM or merge this with MM via pull request. Affeross looked into this for a long time but never did it right.
  22. I don't use MCM for myself, but some features would be nice in TC.
    But I don't like installing a plugin when I don't use the most features ;-)

    So a Reverser would be really nice, an elevator too...if possible.
    Is it possible to create an elevator with visibly moving track on blocks?

    Or... something like a transfer table :p
  23. Offline


    It would be really tricky to make a moving elevator, as there is lots of stuff that can go wrong as well as blocks only moving one block at a time (no smooth movement)
  24. Offline


    Brake and reverse/launch do work, with delay, using the signs. For reverse you simply power the left/right side and leave the third and fourth line of the sign empty. (It's a simple redstone controlled station then)

    Elevators will probably be tricky, since the distance between the carts gets too high. It would simply detach. I can, however, teleport the entire train to the track below (trackmap), but not sure if it has the desired results. :)

    And yes, when it pushes away mobs they can't enter the train, I'll see if I can make mobs enter the cart when they bounce into it instead. If the cart is full it will push them away, seems fair.

    And yep, I can add any property I want to the train and/or the individual members. I can give every train a custom max speed setting and change this when it drives over signs. Using targets I can make this go smooth.

    Note that I am still developing the SignLink plugin to show text on (multiple) signs. I got it semi-working, simply needs some more testing. TrainCarts will then interact with this plugin to allow the use of arrival signs and more. ;)
  25. Offline


    What sign you mean?
    The [train] station one?
    If I do it like you said the train just rolls over it from both directions.
    If I use white wool the train just rolls over it from both directions too.

    For me the train has to stop on the station first before you can choose a direction if you mean that.
  26. Offline


    @DomiStyle Could be MM is interfering (yet again), SignLink is 70% done (only thing left is user interaction and static variable setters/getters), then I'll look at this once again...
  27. Offline


    Okay thank you, looking forward to it.
  28. Offline


    Heya, Bergerkiller, any ideas on why 1.28 Rev1 pushes mobs away, and REv2 and Rev3 don't, with the same config?
    This is making our train fun far less fun :(
    Thank you sir!
  29. Offline


    just letting you know when i restart the server the trains i had are no longer on the map, all carts that were by them self stayed but anything that was apart of a train would not be saved on a restart. dont know if this has happened to anyone before (i looked on the form saw nothing) so i decided to post this here so you are aware of it.

    (using bukkit 1060)
  30. Offline


    What version of the plugin are you using, the last 1.27, or the 1.28 "beta"?

  31. Offline


    Got SignLink working (can show animated text and much more) so got to finish, package and upload that real soon. Arrival times feature will use this plugin for display. (see it as being an add-on)

    No idea if other plugins will use it though, it's hard to keep something like an API

    Anyways, in the meantime also added some auto-mob-entering code. I'll debug it too...


    Ok SignLink is integrated & working, now making a page for it...


    Also, indeed, the pushaway system WAS broken, a bug left by my previous yaw 'correcting'. It is now fixed back, and it will catch mobs quicker. (enter or push)

Share This Page