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


    Badly, I'd probably use Google Translate to translate from Dutch for

    Not sure what is happening there, maybe server lag? I don't cancel block collisions anywhere so that can't be it...does it also happen with one minecart and when TrainCarts is disabled? (not in plugins folder)

    Also, plugin list. :)
  3. Offline


    If "TrainCarts" is disabled, it does go around corners too.
  4. Offline


    @11Spedy11 Not sure what happens though...I have had something like this before (train flying in the air, falls down on ground, if occupied falls through the ground) but I never had that happening on the rails. This bug never happened after I fixed it, so I hope it's not something random that is reoccuring...
  5. Offline


    i can make a video if you wish
  6. Offline


    I guess that would help yes, if possible also do /plugins to show all loaded plugins. (If you have that command, not sure what plugin it is in)
  7. Offline


    Loaded Plugins:

    AdminsCanFly, AntiCreeper, CustomMusic, Essentials, EssentialsChat, EssentialsGeoIP, EssentialsSpawn, FalseBookBlock, FalseBookChat, FalseBookCore, FalseBookExtra, FalseBookIC, HumanSponge, Mantra Weather, MusicCraft, Permissions, PickBoat, Seats, SkylandsPlus, TikiToolkit, Trampolin, UnbreakableBoats, WorldEdit, XcraftGate, Citizens, Train Carts
  8. Offline


    Checked all plugins possibly affecting Minecarts, but no real hazard detected...
    If you can make a video of what happens, when it happens, when not, etc. I might be able to help you out, with the info I have right now I can't really find a bug. (if it even exists...)
  9. Offline


    Sorry to do this but i noticed your ignoring me ://////
  10. Offline


    Her is the Video. In the first seconds you wont see anything :D sorry ^^

  11. Offline


    @11Spedy11 Looool...speachless...I can't even tell how that is even possible...all I ever had was ALWAYS drop till bedrock. Lemme quickly export a version that allow all collisions again and tell me if it fixed something. (DO use a single minecart, trains will probably fail now)

    Try this one and tell me if the same happens. If this is the case I'll try to ignore bit by bit until the same occurs, so you may have to download it multiple times again...


    Just to prevent people from downloading a debug version. :)

    Attached Files:

  12. Offline


    With the sign link i love it but its so hard to time it all with my new train sub way stytem it will be so hard to time it all can you some how make it that we dont need to time it? xD
  13. Offline


    Well it IS possible, but could be

    Requires me to follow the tracks all the way to the destination sign and do magic calculations...this even excludes different minecart speeds and random factors making a difference...

    I can do some simple coding to calculate the trackmap, I'll do some benchmarks too to see what performance impact it has. Problem is...from where? I could use the arrival sign.

    First of all, I need to be able to set pre-set lines when placing signs. It would make everything a lot easier, but this is a feature for SignLink of course. :)

    It's like you place a sign, and the estimated time is already present on the sign. I would probably need to use onPlayerInteract in combi. with a task with delay which places a sign while you edit it.


    What about a stopwatch of some sort? I already see this is going to be incredibly inaccurate (powered rails, random collisions, corners, tick update rate, CPU power, everything...)
  14. Offline

    Celtic Minstrel

    /plugins is in Bukkit, so everyone has it.
  15. Offline


    this is sick as shit.. nice job.
  16. Offline


    It doesn't really work when you have multiple people on one train
  17. Offline


  18. Offline


    @eagledude4 I hope you did download using the link on the main page, note the warning I added. :)

    @11Spedy11 Not sure if I asked before...but does the same happen without TrainCarts running? If it doesn't happen then I'll see what else could cause this behaviour...
  19. Offline


  20. Offline


    I'm having a problem with traincarts/signlink on my server, I created a long track that goes between two stations and I want to have it set up to show the time until the next train arrives, but the trains seem to be stopping between the stations unless someone is riding them. the time on the signs stops when you get out of range too. Any ideas?
  21. Offline


    I'm having an issue with stations. I'm placing redstone torches on the wall next to the sign - minecarts stop just fine. Shouldn't they resume is one of them is turned off? I'm connecting a button to a redstone line that connects to the back of the blocks that the torches are one. When a button is pushed, torch goes out. So shouldn't this be all for the torch that remains lit to dictate the cart's direction of travel and send it off?

  22. Offline


    @Kashius1138 Well it uses the delay in the station when you power one side. If you use, for example, this sign:
    And the train arrives when both sides are powered, it will brake. Once one of the sides loses power, it will wait 5 seconds and then apply the new changes. (I know, it is because of a previous version that didn't use continue/reverse/left/right)

    If you like having instant launch after changing better you should not set a delay. Not sure what station mode/settings you use. :)

    If this doesn't happen then there's a bug, post the plugins you use (and of course download it again to be sure you got the latest) and/or post possible behaviours you noticed.
  23. Offline


    I managed to resolve the issue. This plugin rocks my socks :)

  24. Offline


    Glad to hear that. :)

    Now back to MyWorlds' RegionRepair class that just got wiped because of my failing HDD...sigh -.-
  25. Offline


    Hello, first of all i want to say that i love your plugin. Its really great for mass-transport from "a" to "b".
    But i think i found a bug in the new version of the plugin:

    As described in the wiki, i use some "+" intersections for my trains:
    Since 1.28 and 1.29 trains stop at "+" intersections.

    Until 1.27 all runs great, trains act how single minecarts and favor south/west.

    I hope you can fix it, because its wasted up many of my crosstrails.

    Greats, DonDav
  26. Offline


    @DonDav Could you send me the v1.27 version? Think I lost it... :)

    I'll see what I changed from 1.27 to 1.29 and try to restore this feature.
  27. Offline


    Any idea how easy/difficult this would be to implement as a Single-Player mod?
  28. Offline


    Now THIS is what a great developer looks like! 100% AWESOME!
  29. Offline


    @Triskelli pretty hard, since I then have the appearance-related coding in there too. The coding used in this plugin only really changes the location of the minecart, the client will do the movement animations and others. If I do this plugin for a client mod, chances are that it would stutter and look weird in the turns. (benefit of physics and appearance coding separated, more 'room' to code in)

    @The_Fallen thanks. :)

    @DonDav I know what the change is that causes this issue. During the latest update I changed the yaw coding around, and during the 90-degree direct turn the yaw is wrong, but the yaw compared with it (to flip 180 to fix it) then fails, since it's not a smooth turn. I'll have to change the returned yaw for the straight tracks to fix this. :)


    @DonDav great thanks for reporting it, because this could have affected other things too! I was returning a yaw of 90 degrees for face WEST, this should be 270 (or -90). Same applied for the SOUTH. It was basically failing because of this. Also found out that just-placed carts were using an invalid yaw as well, not noticable, but could still cause some issues in the end. Your issue is solved now.

    After I fixed a bug someone mentioned (carts duplicating on reload) I will publish a 1.3 *fixed*

    Any other feature requests for v1.3?
  30. Offline


    We need a function so they don't derail, also Im having problems with the station sign, the minecart doesn't respond (is this a problem with falsebook?)
  31. Offline


    @1994mat You powered the sign on both sides (or only the front/back, added since 1.29)? Because only then continue, reverse, left and right functions are active.

Share This Page