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


    Please do :|
  3. Offline


    Right now it doesn't seem to retain train properties - which is quite annoying. Still browsing the code to see what is going wrong.


    I am just epic :)
    Today: diving trains. It will now adjust the cart's pitch when diving in mid-air :)

    Ok see version 1.6 beta 12 on GitHub. Changes:
    TODO for later:
    - making powered minecarts have the same slow-down speed as regular minecarts.
    - Correctly syncing passengers with minecarts. (right now it is very buggy)

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


    Well, this is bad news for my subway people. >:)
    Would this fix the chunk loading issue?
    *goes to test anyway*
  5. Offline


    how i do that?
    i got a cracked version :(
  6. i just installed the latest build of this on my server, everything loaded fine until i tryed to place minecarts....
    it floored my server, even killed my connection after id reloaded it on localhost. had to remove the plugin just to get the server to load up again.
    the problem happens when the carts meet up
    i got this error

    05:26:59 [SEVERE] java.lang.NoSuchFieldError: bN
    05:26:59 [SEVERE] at
    05:26:59 [SEVERE] at net.minecraft.server.EntityMinecart.y_(EntityMinecart
    05:26:59 [SEVERE] at net.minecraft.server.World.entityJoinedWorld(World.ja
    05:26:59 [SEVERE] at net.minecraft.server.WorldServer.entityJoinedWorld(Wo
    05:26:59 [SEVERE] at net.minecraft.server.World.playerJoinedWorld(World.ja
    05:26:59 [SEVERE] at net.minecraft.server.World.tickEntities(
    05:26:59 [SEVERE] at net.minecraft.server.MinecraftServer.w(MinecraftServe
    05:26:59 [SEVERE] at
    05:26:59 [SEVERE] at
    05:26:59 [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(
  7. Offline


    bergerkiller ever think of adding something in to increase the momentum of carts similar to pglboost? (I have it on my server and have it currently set so you only need 1 track booster every 60 track spaces) Would be kind of nice to have all of the minecart alterations/mods as one nice pretty package to help prevent conflicts.
  8. Offline


    sylergcs If you use CB 1780 or above, use the beta versions found on GitHub. 1.54 is the latest build for 1575 (1597), I stopped supporting that CB a while ago. You need to update CraftBukkit OR TrainCarts.

    kinkinhood You can already set the max speed limit and set if the carts slow down or not. With that in mind you can set carts to go at higher speeds infinitely, not requiring boosts.

    In the configuration you can set the launch velocity at which stations launch trains. You can adjust this to make them launch further away. (although at 10000+ it doesn't really make a difference)
  9. Offline


    I'll have to take a look at that. I didn't know there was an option for preventing carts from slowing down.

    So going to try to make a materials storage facility using the item to chest drop off. Out of curiosity is it able to deposit into dispensers as well or only chests?
  10. Offline


    kinkinhood chests only for now, but it's a good suggestion to include furnaces and dispensers :)
  11. Offline


    Yes :) One of my players has an idea for a chicken grinder and having it be able to load into dispensers would make it be able to indefinably run on its own.
  12. Offline


    Ok good news:

    Well passengers...almost. I need to do some more advanced calculations for that.

  13. i have the latest CB and trains
  14. Offline


    How could we get this T-Intersection to work?

    I thought the routing system would have taken into account non-powered rails with detectors on the opposite side to the minecart and tried to avoid them (In this example, the cart is meant to come from the right line closest to the bottom of the image, to the line on the opposite side of the intersection closest to the bottom of the image - However, the cart goes to the line which is above the one it's meant to go down, and gets stuck on the unpowered rails)

    Thanks :D
  15. Offline


    andrewpo Are you sure the U-turn is the shortest route it will go? It will always use the shortest route, so it's possible that the other rail leads to the destination earlier.

    And no, the destinations don't look at (un)powered rails. Doing so will require a bit too much processing power to turn a single piece of track...
  16. Offline


    Aww, so that didn't end up working? (must've been pure luck that it's worked so far for my rails. then again I haven't tried doing a crossover station like that yet. Kinda sad though, it seemed like it was going to work awesomely.)
  17. Offline


    Is it possible to have 3/4 way intersections that have 2 rails going in each direction using traincarts?
  18. Offline


    andrewpo yes, but I haven't added side-block direction detection yet: it will assume it can travel past every type of track. Perhaps add some sort of one-direction-only sign?
  19. Offline


    What would I do for that?
  20. Offline


    andrewpo it's not yet in there; I need a suggestion for a nice name for it :)
    And what should it do? (It's still in Beta, don't forget)

    The destination reader will notice this sign and break the path at this sign when looking from the wrong direction. Should it do something physical as well? Turn carts around instantly? Anything?
  21. Offline


    can you implement N/E/S/W for the one-way signs? Easier if youre working with signs underground and place signs right under the block.
  22. Offline


    Also on the subject of signs, could you allow for the
    eject all
    sign to have XYZ coordinates and pitch/yaw?
  23. Offline


    What of doing one way sign and the powered side is the direction that is permitted?
  24. Offline


    On my server, I am not allowing any of the players to use the train function... other than using it as transporation. I have created a predefined layout / system, but the problem is that i'd like to prevent my users from jumping out of the train while moving. I would only like for them to board or exit at stations only... forcing them to use my already created destination points.

    It would be great to get this implemented or even put on your to-do list.

    Anxious to see the fix to the bumping carts... gonna grab that Beta 12 now!

    Very cool... have already installed the newest beta and the trains are now very smooth! very nice.

    Also, regarding the saving of the train information (which I think you referred to above somewhere, not sure if that was what you were talking about), this is the problem i'm having.

    While in game and with no trains existing:
    • Check TrainProperties.yml: Empty.
    • Create a train.
    • Check TrainProperties.yml: Empty.
    • Stop the server, now contains:
      • train0:
      • keepChunksLoaded: true
      • pushAway:
      • mobs: true
      • players: true
      • carts:
      • de827030-7cd8-49ac-9fbd-913eac46bf8c:
      • owners:
      • - saki2fifty
      • allowMobsEnter: false
      • 3f71119a-ed09-4eaf-9313-1ca00915d8ce:
      • owners:
      • - saki2fifty
      • allowMobsEnter: false
      • e3d82871-3875-4bdd-968e-d143272e624c:
      • owners:
      • - saki2fifty
      • allowMobsEnter: false
      • 5c2723a5-e228-433f-abf5-b4b2d9ab854d:
      • owners:
      • - saki2fifty
      • allowMobsEnter: false
      • d440d080-5c91-484a-bd7c-7d78b458ab86:
      • owners:
      • - saki2fifty
      • allowMobsEnter: false
      • 8111aa59-12a2-4e53-b258-c77b0c64d63c:
      • owners:
      • - saki2fifty
      • allowMobsEnter: false
    • Start the server.
    • In game, the train no longer visually appears.
    • Check TrainProperties.yml : still contains train information.
    • Create a new train.
    • Check TrainProperties.yml : still has the information from the old train.
    • Stop the server.
    • Check TrainProperties.yml : old information has been cleared, new train information now exists.

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


    It is implemented.

    When they get in the cart, pass it over a

    then at the end of the journey, the same as above but with allow instead of deny.

  26. Offline


    Ah... why i missed this, no idea. Trying it now. Thanks!
  27. Offline


    Hey Andrew, remind me to invite you onto my server again sometime. I just finished something kinda awesome making use of the chest drop off/pick up system.

    bergerkiller: something worth noting with the chest drop off/pick up is it is a decent bit finiky when it comes to the line for item names. Some you have to use the item ID number, others you have to use an item name for it to function properly(i.e. netherbrick won't work unless you use the item ID number and cobblestone won't work unless you use the name of cobblestone instead of the item ID number).
  28. Offline


    kinkinhood that is because netherbrick is actually brick with a different sub-id, I believe you use this:
    But I am not completely sure. The naming is a bit hard to do unfortunately, but I'll come up with a solution :)

    Same for:
  29. Offline


    Ha! i figured it'd be something like that. Perhaps switch it over to using item ID numbers with the : for the variations? While it may not look as pretty and you'd need your decoder ring with you when putting it together, it may work more consistently. (then again I don't know if that's possible). I'll make a video of what I've put together later on, you may like it.
  30. Offline


    kinkinhood that is already possible:
    It constructs an item stack parser from a name and sub-name, converts these separate names to ID and subID and compares that when transfering items. But, since they have to be separated, I can't use names like stairwood or woodstair, as I can't separate that. I will need to add separate mapping to do that. (map<String, ItemParser>)
  31. Offline


    Ah ok.

    on random sidenote, do you have any idea as to why


    works for the item but


    doesn't?(4 is the item ID number for cobblestone)

Share This Page