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


    Updated for latest RB.


    Notifications didn't work once again..sigh
    I'll look at the powered minecart issues you are mentioning. And yep, plugins exist to charge players to enter a certain minecart, not really needed here. :)

    Not sure about player locking, they sure need to be able to get out at some point...


    Re-uploaded it, contained a minor yet huge issue with redstone vs. signs. (didn't use the blockface). Try again @Leendert :)
  3. Offline


    Thanks, everything is working again
  4. Offline


    io exception error on startup w/ 1240:
    10:44:17 [WARNING] [TrainCarts] An IO exception occured while reading groups!
    10:44:17 [SEVERE]
    10:44:17 [SEVERE]       at Source)
    10:44:18 [SEVERE]       at Source)
    10:44:18 [SEVERE]       at Source)
    10:44:18 [SEVERE]       at$WorldGroup.readFrom(
    10:44:18 [SEVERE]       at
    10:44:18 [SEVERE]       at
    10:44:18 [SEVERE]       at
    10:44:18 [SEVERE]       at
    10:44:18 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.enablePlugin(
    10:44:18 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.loadPlugin(
    10:44:18 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.enablePlugins(
    10:44:18 [SEVERE]       at net.minecraft.server.MinecraftServer.e(
    10:44:18 [SEVERE]       at net.minecraft.server.MinecraftServer.a(
    10:44:18 [SEVERE]       at net.minecraft.server.MinecraftServer.init(
    10:44:18 [SEVERE]       at
    10:44:18 [SEVERE]       at
  5. Offline


    @GravelSocks probably because of an older version. Use /reload and it should be fine.
    (I had to change the data format to include a train name)
  6. Offline


    Hmm. I wasn't using an older version. I installed the latest version from the download link and started the server.
    Let's see what happens if I delete the old plugin folder - ok - deleted the old folder and put your plugin back in and no error this time. Thx!
  7. Offline


    @GravelSocks with older version I meant, older version the file is saved in. The format got changed at some point. :)
  8. Offline


    I have found a bug that if I have a train stopped at a station, and under that station I have a lever and its powering a device via redstone, it stays powered if you destroy the minecart before it leaves the station. Can you make it so if a minecart doesnt exist in the station, the redstone is not powered?

    Also, is it possible to set the owner of a train via sign? or any way to set the owner of spawned trains?

    Is @DeathQueen a co-developer on this? What is her role in this plugin?
  9. Offline


    @Omen She didn't code the plugin, that is, but she is being supportive now and then. :)

    Also, I know how to fix that: when removing a member, check if it has an active sign, and if so, remove this sign from the group. (fire GROUP_LEAVE event for the sign)


    Weird, the active signs are already handled correctly...
    Maybe a little more detail of how to reproduce it? Or is 'single-cart train leaves station, I remove the cart, lever stays on' all that happens?
  10. Offline


    I have a spawner, i press the button, one cart spawns and stops at my station.
    My lever (attached to the [train] sign) is there so the button will not spawn any more carts until the cart leaves the station.
    If someone destroys the cart before it leave the station, the lever does not power-off.
    No more carts can be spawned because of my "no spawn" device I set up.

    If someone rides the cart, or the cart leaves on its own, the lever powers off.
  11. Offline


    Oh! I found a bug. :) Latest 1.39 Plugin and 1240 CraftBukkit.

    whenAtStation parameter in config.yml (if set to false) makes a cart immune to powered rails after stoping at the station.

    How to reproduce a bug:
    Check whenAtStation parameter is true.
    Make a horizontal straight track and put a station (see sign text below) under it. Make it redstone powered on both sides. Add a 5 powered rails going up (and power them) after the station. Launch minecart towards the station. After the station your minecart should go all 5 blocks up and get off the track. Now stop the server. Change whenAtStation parameter to false. Launch the server. Launch new minecart. Now it will ignore powered rails. You can "play" with it now, but cannot speed up with redstone.

    setOwnerOnPlacement: true
    removeDerailedCarts: false
        cartDistance: 1.5
        cartDistanceForcer: 0.1
    use: true
    maxCartDistance: 4.0
    spawnItemDrops: true
    keepChunksLoaded: true
        cartDistance: 1.6
        cartDistanceForcer: 0.2
    maxCartSpeed: 0.35
    useCoalFromStorageCart: false
        z: 1.0
        y: 0.0
        x: 0.0
    breakCombinedCarts: false
        pushPlayers: false
        pushMobs: false
        atVelocity: 0.1
        whenAtStation: true
        pushMisc: true
        force: 0.2
        pushPlayer: false
    poweredCartBoost: 0.1
    nearCartDistanceFactor: 1.2
        tags: []
        passengers: []
        trainCollision: false
        allowMobsEnter: false
        owners: []
        allowLinking: false
        slowDown: true
        tags: []
        passengers: []
        trainCollision: false
        allowMobsEnter: false
        owners: []
        allowLinking: false
        slowDown: true
    station sign:
    station 5
    There's more. I cannot find the source of the problem jet. But it looks something goes wrong when nobody is online. Will investigate further, but I really need a command to destroy all the minecarts in the world to make further tests.

    Destroying approx. 1000 minecarts manually (as the got stuck and so not moving in any way) is very annoying thing.

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

    Celtic Minstrel

    @Rigeborod – If you have WorldEdit, you can do /remove minecart <radius> to remove all minecarts within a certain radius of you.
  13. Offline


    well. nice plugin, I use in on my private server to build an advanced railing system, however: to get started an to stop on station brings its limits to it. at the moment i use 10 powered rails folowed by a detector rail, everything is powered by pressing a button.however this limits the train size to 5 carts and making longers starts wont work either becouse the trains wont stop them.
    so how about some kind of trottle system on the minecarts so you can "drive" them by pressing W or S ?
    it would be very nice

    ps. srry for bad english
  14. Offline


  15. Offline


    I'm running into compatibility issues with Falsebook (specifically the carts mod). I'm not sure why but boosters work like over 9000 times stronger then normal in that mod, but for some reason while going up a block on a incline the cart will decide to stop, and return the way it came as if hit a wall. Removing FalsebookCarts.jar from my plugin folder has resolved the issue for now. I'll post this onto the Falsebook page as well.
  16. Offline


    i have a suggestion *which i posted on the bukkit discussion forum*

    basically what i was thinking can anyone make a plugin that lets you place a chest with a sign that says something like 'pickup' and another chest with a sign that says 'drop off' and it's on a looped track meaning the cart will just do laps in a long circle. so lets say your far away mining and your inventory is full you don't wanna run all the way back home just to drop off your load you place it all in a chest labeled pickup and a cart will receive as much as it can fit in it's chest *on the cart*as it passes by when it reaches the drop off chest it empties all it has into the chest. now you could have more than one dropoff chest lined up one after the other this way when one is full it will just empty out into the next more empty one.

    this plugin would work well with that train cart plugin since that one will link all the carts together and all you'd need is just one powered cart to get it all moving unless this can also be incorporated into the this idea then it's a nice all in one package

    thx for takin time to read this
  17. Offline


    @War2k Minecart Mania implements this feature too, and it is compatible. You can use that alongside TrainCarts for now.

    @Korpsicle Do boosters work with Falsebook if you remove TrainCarts? Because I encountered the same with Minecart Mania, but over there Booster rails didn't work at all...
  18. Offline


    @bergerkiller Hello there. What about bug I've found? And a request for minecarts remove command...
  19. Offline


    @Rigeborod I'm not sure what goes wrong...any errors?
    Could be it is keeping chunks loaded even if there is no one online. See if setting keepChunksLoaded to false helps.

    I'll add a remove command...but it will only apply to the trains you own. (or you have global ownership)
  20. Offline


    also CommandSigns lets you make signs that do things. you could use the plugin MinecartRemover along with that. I got it to work.

    i use traincarts and a bunch of redstone to spawn a ton of minecarts then delete them with the sign.
  21. Offline


    Yeah my boosters work, they're just not as powerful, and then I don't have a problem with them going up hill. Right now I have my server running Falsebook (not including the falsebook carts plug-in) and TrainCarts without hindrance.


    This was how I deducted the compatibility issue.

    Ran with just Falsebook (full) - Fine
    Ran with just TrainCarts - Fine
    Ran with just TrainCarts and Falsebook - Problems.
    Ran everything BUT TrainCarts - Fine
    Ran everything BUT Falsebook - Fine
    Ran everything W/O FalsebookCarts - Fine
    Ran EVERYTHING - Problems.
  22. One word: Awesome !
  23. Offline


    @Korpsicle I somewhere both FalseBook and TrainCarts handle powered rails, causing it to fail. My guess is that FalseBook expects the Minecart to get a boost, while internally this doesn't happen. (when entering or leaving a station that is)

    Not sure how I can fix that...maybe if FalseBook has an API I can add support.


    Not the case unfortunately. What features of FalseBookCarts do you need exactly? I can always work on a train-specific implementation.
  24. Offline


    Is it possible to stop it at the station for a specific amount of seconds, instead of it standing still all the time or make it drive again directly?
    An idea could be
    00:10 - countdown from 10 seconds.
  25. Offline


  26. Offline


  27. Offline


    @bergerkiller The bug is:

    whenAtStation parameter in config.yml (if set to false) makes a cart immune to powered rails after stoping at the station. See my big post above for details. The other bug with logging off I will be able to track down when remove command is implemented.
  28. Offline


    To be honest, the only thing I miss from that plug-in, was that it allowed my multi-cart system to be sufficiently powered for extremely long trips. I can't figure out why FalsebookCarts' booster rails are so powerful, or if there's a coasting modification, but without this functionality my rail system stopped working, and I've needed to go across long distances replacing regular rail with more powered track.

    In the end, I just need a stronger powered rail, or making carts "coast" better. I'm sure there's another plug-in around here somewhere that does that though . . .

    Thank you very much for the support, loving my now-automated train station system, even if it only gets halfway to the next station for now :)

    Also, I noticed that multi-cart trains have issues with turning on tracks, in that it slows down immensely. Is this intended, or am I missing something?
  29. Offline


    When turning in corners? If so, - Go to you your config.yml and edit the spaces between each cart. I have mine at 1.5 - And they're running without problems.

    /Amazing plugin, it fits all my needs!
  30. Offline


    I have mine set to 1.5 as well. Still having issues.
  31. Offline


    Do you have multiple corners or just one?

Share This Page