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

    bergerkiller

    [​IMG]

    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. :)

    Description:
    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.

    Media:

    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.

    TODO:
    - Train-sign message handling using SignLink (low priority)
    - Minecart use permissions (for individual carts?) such as Storage Minecarts

    Commenting

    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.

    Changelog

    Show your appreciation for my plugins by donating
    [​IMG]
     
  2. Offline

    Lextao

    Well, it's very buggy :(

    If you try to take a curve with 3+ minecarts they will get stuck if there are adjacent blocks to the rails... etc.
    Sorry but i'm not using it for now.

    EDIT: NVM, I messed up with the config file and now it works perfectly :D

    Great plugin!
     
  3. Offline

    js105287

    Sounds great! I'll check it periodically to see when it's fixed :D
     
  4. Offline

    bergerkiller

    Ok so I now use:
    Instead of:
    The first one works, the second one leaves weird ghost Minecarts behind which I can't remove. However, the first one is set with a delay; it gets 'cleaned up' upon the next tick. This next tick is why a reload spam causes it. Now finding out what this cleanup is so I can do it in one go, hopefully I'll end up with a solution...

    Updated TrainCarts to 1.26 fixing (maybe) quite some bugs I randomly encountered during various test-runs...
    Also added a station delay (in seconds) on King's request. :)

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

    MechanID

    in 1.26 i have a problem - train ingoring obsidian block from Minecart Mania
    tested on cb1060 only MM and TrainCarts
     
  6. Offline

    bergerkiller

    @MechanID ok I'll look at it. Btw if you use 1.26, download again for a temp. 1.27 (not official though). It fixes an annoying ghost minecart spawn bug during reloads.

    EDIT

    Are you sure you didn't power the obsidian block? It doesn't stop carts when it's powered, then it launches them...
    If you used a certain sign underneath, tell me which one so I can debug it properly.

    Ok officially updated to v1.27 fixing the bug @js105287 mentioned. Ghost carts are history. :)

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

    MechanID

    @bergerkiller

    my start log
    01:29:01 [INFO] [TrainCarts] 1 Train has been loaded in 1 world. (2 Minecarts)
    01:29:01 [INFO] [TrainCarts] version 1.27 is enabled!
    01:29:01 [INFO] [Minecart Mania] Debug mode switched to NORMAL
    01:29:01 [INFO] [Minecart Mania] MinecartManiaCore version 1.2.8 is enabled!
    01:29:01 [INFO] [Minecart Mania] MinecartManiaStation version 1.2.5 is enabled!
    01:29:01 [INFO] [Minecart Mania] MinecartManiaChestControl version 1.2.5 is enabled!
    01:29:01 [INFO] [Minecart Mania] MinecartManiaSignCommands version 1.2.8 is enabled!
    01:29:01 [INFO] [Minecart Mania] Permissions not found. Using OP for admin commands.
    01:29:01 [INFO] [Minecart Mania] MinecartManiaAdminControls version 1.2.7 is enabled!
    01:29:01 [INFO] Server permissions file permissions.yml is empty, ignoring it

    i still ignoring obsidian block (it connected to redstone but unpowered)
    i try 2 blocks 1st without sign 2nf with sign Launch East amd then i try Launch West - no success
     

    Attached Files:

  8. Offline

    bergerkiller

    If it didn't include this:
    This means it didn't even detect Minecart Mania, didn't hook into the library and doesn't use it at all. Could you verify if this line is present or not?

    EDIT

    Since when does Minecart Mania load BEFORE TrainCarts?! Ow well, I'll fiddle a bit with the plugin.yml...

    EDIT2

    Ok added a simple softdepend: line i nthe plugin.yml to ensure MM loads first. Try re-downloading it now...
    Note: didn't mind incrementing the version for something unnoticable...
     
  9. Offline

    MechanID

    @bergerkiller
    i redownloaded jar file from https://github.com/downloads/bergerkiller/TrainCarts/TrainCarts.jar
    here is my full log
    02:05:47 [INFO] Starting minecraft server version Beta 1.7.3
    02:05:47 [INFO] Loading properties
    02:05:47 [INFO] Starting Minecraft server on *:25566
    02:05:47 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-980-g4ed23b1-b1060jnks (MC: 1.7.3)
    02:05:48 [INFO] DataSourcePool [MinecartManiaCore] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
    02:05:48 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
    02:05:48 [INFO] Entities enhanced[0] subclassed[2]
    02:05:48 [INFO] DataSourcePool [MinecartManiaSignCommands] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
    02:05:48 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
    02:05:49 [INFO] Entities enhanced[0] subclassed[2]
    02:05:49 [INFO] Preparing level "world"
    02:05:49 [INFO] Preparing start region for level 0 (Seed: -7118954035771847474)
    02:05:50 [INFO] Preparing start region for level 1 (Seed: -7118954035771847474)
    02:05:50 [INFO] Preparing spawn area: 16%
    02:05:50 [INFO] [TrainCarts] version 1.27 is enabled!
    02:05:51 [INFO] [Minecart Mania] Debug mode switched to NORMAL
    02:05:51 [INFO] [Minecart Mania] MinecartManiaCore version 1.2.8 is enabled!
    02:05:51 [INFO] [Minecart Mania] MinecartManiaStation version 1.2.5 is enabled!
    02:05:51 [INFO] [Minecart Mania] MinecartManiaChestControl version 1.2.5 is enabled!
    02:05:51 [INFO] [Minecart Mania] MinecartManiaSignCommands version 1.2.8 is enabled!
    02:05:51 [INFO] [Minecart Mania] Permissions not found. Using OP for admin commands.
    02:05:51 [INFO] [Minecart Mania] MinecartManiaAdminControls version 1.2.7 is enabled!
    02:05:51 [INFO] Server permissions file permissions.yml is empty, ignoring it
    02:05:51 [INFO] Done (0,229s)! For help, type "help" or "?"
     
  10. Offline

    bergerkiller

    Ugh github didn't update hte plugin as I requested..seec

    EDIT

    WHAT IS THIS?!
    Every time I try to replace it and download it again as check, it returns me a jar with old plugin.yml...uuuuuugh

    I'll just add a line of code somewhere so it accepts it. -.-
     
  11. Offline

    MechanID

    now i have error 404 when try to download it
     
  12. Offline

    bergerkiller

    So YOU are the cause for the return of the lost archive...lol
    Good I waited a few mins and THEN uploaded.

    it's now uploaded with the CORRECT plugin.yml...github is buggy :eek:
     
  13. Offline

    MechanID

    ok ill waiting for your update here.
     
  14. Offline

    bergerkiller

    ...it is already uploaded. xD
     
  15. Offline

    MechanID

    You are my hero, it works now! Thank you very much!
     
  16. Offline

    SergeantH

    I am experiencing a bug where, trains stop as they pass across pointwork. They stop dead.
    Only seems to happen on trailing points. Leading points are fine.

    The setup I have is two parallel tracks with a crossover so that trains travelling on the right-hand side will be routed over to the left-hand side (see attached image).

    This appears to happen with all trains (that is, 2 or more cars. Although, much more likely to occur with 3 or more).
    With my track layout this happens every time they pass over the points.

    N.B. The colors in the attached image look a tad wierd because the image was taken
    at night and adjusted to make it clearer to see.
     

    Attached Files:

  17. Offline

    bergerkiller

    @SergeantH Same as before I can't seem to reproduce it...it is pretty obvious how to reproduce it and what seems to happen, but it doesn't happen when I try it out: they simply move on...

    I tried all 4 possible directions a train can come from, all worked. Also the other 4 of how they take the turn...

    You are using the latest version & are you using possible other plugins that change Minecarts? (FalseBook vehicle, CraftBook vehicles, Minecart Mania, some others I don't know). Errors in the log?

    Also, any obstacles in the setup (like a piece of fence on the sides) or did you try it out this clean?

    Uploaded a file to show the overkill I had to use to get this effect...
    ScreenShot1.png
     
  18. Offline

    MechanID

    @bergerkiller
    Please tell me, can i disalble somehow constant speed of trains ? when i use TrainCarts with MM, because it is confusing when train formed from only storage minecarts moving non stop on standard rails even up to the hill.
     
  19. Offline

    bergerkiller

    It's a setting in Minecart Mania, but I failed to find it myself too. Better to ask it in their own thread, it must be a configuration setting somewhere in MinecartManiaConfiguration.xml. Did see this:
    But afraid setting that to 0 will not disable the feature...
     
  20. Offline

    mze9412

    It's AutoCart. We do not use it on my Server ;)
     
  21. Offline

    SergeantH

    @bergerkiller I found the problem originally using a double track in a 3x3 tunnel with the track on each side.
    I have found, that in a 'clean' environment (i.e. in a test world) the problem does not occur.
    I did some further experimentation and I have found that only certain blocks around the junction seem to cause it.
    Strangely, those blocks do not always have this adverse effect. Sometimes they just do not effect the train at all.
     
  22. Offline

    MechanID

    @mze9412
    i dont use AutoCart on my server too, if you use TrainCarts and MM and havent this problem please tell me what your versionn of MM (each modul) and craftbukkit version
     
  23. Offline

    mze9412

    I have one of the development builds of MM and CB1060. Because of the developmentbuilds I can't give you a better version number, sorry :)
     
  24. Offline

    bergerkiller

    @SergeantH Now that helps me in debugging it. :)
    I can now limit it down to the onMove collision tester, and the onVehicleBlockCollision event. I'll see what I can do to prevent it...
     
    SergeantH likes this.
  25. Offline

    Aox

    I'm having an issue that is severely affecting server stability. Our server has a very large track that connects different geographical locations together, and the track runs in a giant loop around our generated section of world.

    I'm starting to see this error constantly, and it crashes the server when it happens. I can travel around the world cleaning up carts, and the server gets stable with a very small number of trains, but if I send multiple trains around the system to pick up items at different dropchests, I randomly get these crashes when the trains crash or interact:

    Show Spoiler

    14:11:45 [SEVERE] java.util.ConcurrentModificationException
    14:11:45 [SEVERE] at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
    14:11:45 [SEVERE] at java.util.AbstractList$Itr.next(AbstractList.java:343)
    14:11:45 [SEVERE] at com.bergerkiller.bukkit.tc.NativeMinecartMember.filterCollisionList(NativeMinecartMember.java:946)
    14:11:45 [SEVERE] at com.bergerkiller.bukkit.tc.NativeMinecartMember.move(NativeMinecartMember.java:690)
    14:11:45 [SEVERE] at com.bergerkiller.bukkit.tc.NativeMinecartMember.postUpdate(NativeMinecartMember.java:415)
    14:11:45 [SEVERE] at com.bergerkiller.bukkit.tc.MinecartMember.m_(MinecartMember.java:70)
    14:11:45 [SEVERE] at net.minecraft.server.World.entityJoinedWorld(World.java:1213)
    14:11:45 [SEVERE] at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:48)
    14:11:45 [SEVERE] at net.minecraft.server.World.playerJoinedWorld(World.java:1195)
    14:11:45 [SEVERE] at net.minecraft.server.World.cleanUp(World.java:1111)
    14:11:45 [SEVERE] at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:456)
    14:11:45 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:369)
    14:11:45 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    14:11:45 [SEVERE] Unexpected exception


    Any ideas? This mod is the best thing to ever happen to our server full of train geeks.

    -Aox
     
  26. Offline

    bergerkiller

    It's fixable, but kinda weird it happens...it is in the world entity list. I'll do an emergency check there so it will use a solid list of entities. :)
     
  27. Offline

    Aox

    That would be fantastic. I'm currently walking our tracks trying to catch all the trains to clear them out so our server will stay up more than 5 minutes!! DOH! haha!

    You have a donation link? You fix my problem today, dinner tonight's on me!

    -Aox

    Another error, probably related?

    Show Spoiler

    15:44:16 [SEVERE] java.util.ConcurrentModificationException
    15:44:16 [SEVERE] at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
    15:44:16 [SEVERE] at java.util.AbstractList$Itr.next(AbstractList.java:343)
    15:44:16 [SEVERE] at net.minecraft.server.World.cleanUp(World.java:1130)
    15:44:16 [SEVERE] at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:456)
    15:44:16 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:369)
    15:44:16 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    15:44:16 [SEVERE] Unexpected exception



    -Aox

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

    bergerkiller

    @Aox I do plugin developing for the experience, not to get rich...lol :p
    And the second error you posted seems to be the cause for the first one...
    I'll have to take a stronger look at the train replacement code again...sigh

    Btw: just before I start fixing a fixed bug: you are using 1.27?
    And also, if you used the 'experimental tile entity fix' of Craftbukkit, try using the recommended build. It could have something to do with that.
     
  29. Offline

    Aox

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

    bergerkiller

    Ok I'm on for around 10-30 more minutes then I'm off to bed. If you found something feel free to PM me or post it here, I watch these forums regularly. :)
     
  31. Offline

    Aox

    Right on, man, I really appreciate it. 1.28 is now running, the boys will be getting off work and we'll give it the ole workout tonight, I'll have a report for you when you wake!

    Sleep well, my friend :)

    -Aox
     

Share This Page