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

    bergerkiller

    @korsanclan I can understand it. :)
    Yep, you can add multiple tags to the train, see the WIKI and the video of this feature.
    Also, it's [train] and then tag, weird that it crashes on day...

    Tested it myself (both day and tag), but none crashed my client nor my server. Did you get any errors in the log, to why the client got disconnected? Bad packet or something? Could be a server<>client version mismatch.
     
  3. Offline

    BlancoLanda

    @bergerkiller Well, I made a huge train station for my server but the size is a problem.... When the train went very far it never returned... I installed a plugin called Minecart Permanence that makes the chunks where ROADING minecarts are unloadable. All is OK, but when I restart the server it gets bugged again, I must go where the trains are so they start roading again... I don't know if you understand me, I have not a good english and I don't know how to explain it :S Simply I want to suggest if you can make the trains road EVERYWHERE, and keep it roading always... like loading the minecarts in movement..., so we can build stations. I didn't find a plugin that does that.
     
  4. Offline

    OLIX

    Where can I download a Bukkit 1000 version for my 1.7.3 Server ?
     
  5. Offline

    korsanclan


    I have to run the client with the book now GetError.bat and error messages in the client connection to the server it was not! I'll even try a new installation and the mods and plugins are individually after theinstallation to check it odb one after the error or not!

    sorry the way it's been a write error: ยง It is of course
    [train]
    tag
    a
    b


    Thank you from before!
     
  6. Offline

    bergerkiller

    @BlancoLanda it actually does that atm. If a train ends up in unloaded chunks, the train is stopped, saved and unlinked. Once all carts are in loaded chunks again, the velocity is restored and the train is linked. It appeared to work till now...

    Also, if you use a different plugin to keep chunks loaded, disable the keepchunksloaded property in TrainCarts!

    @OLIX Afraid I don't have it anymore, do have the old version in source. Lemme compile it in a sec and put it on mediafire.

    @korsanclan if you run SignLink, disable it. It could be it is sending a too-long-line to the client. Also, you should get an error when you get disconnected (brownish screen), what is this error?

    @OLIX Ok added a dl link for 1.73. Do note that I no longer support this, but it is still stable. Does not contain some of the features the 1185 version has.

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

    BlancoLanda

    Code:
    12:29:56 [INFO] [TrainCarts] 190 Trains have been loaded in 1 world. (190 Minecarts)
    I just announced about that in my server! I have only one rail and is empty... how can I remove the minecarts? my plugins:

    Code:
    12:39:22 [INFO] Plugins: AntiCreeper, AutoMessage, CommandBook, CommandSigns, Es
    sentials, EssentialsSpawn, FalseBookCart, FalseBookCore, HeroicDeath, iConomy, I
    temCommandRepair, Minecart Permanence, NoSpeedKick, PermissionsEx, PvPReward, Re
    sidence, SignLink, Turnstile, Vault, WorldEdit, ChatManager, AuthDB, ChestShop,
    Citizens, dynmap, LWC, Train Carts, WorldBorder
    EDIT: The keepchunksloaded is working fine for you in RB 1185? If I enable that my trains would return if there is a very long station?

    EDIT2: Is there any way to avoid animals from entering trains?
     
  8. Offline

    bergerkiller

    @BlancoLanda

    1. First one: remove the trains.groupdata file to permanently unlink all trains. You can also use NoLagg to set a limit of 0 for minecarts, also clears all of them.

    2. It worked fine yes. If there are issues with it, I'll look into it.

    3. Yup, see the wiki page
     
  9. Offline

    BlancoLanda

    @bergerkiller Thank you! But why when sometimes I create a train of 5 carts for example, and I use "/train info", it says: "You don't own a train you can change!" Being admin and OP ofc.
     
  10. Offline

    bergerkiller

    @BlancoLanda did you try left-clicking the train and then using /train info?
     
  11. Offline

    BlancoLanda

    @bergerkiller oh yeah, I restarted the server and it worked fine... But I have a serious problem, with keepchunksloaded to true my train never returns :( so I can't make my station, it looks like that function isn't working for me. Do you know what could be the problem?

    bah... I cannot make it work :(, or I am wrong IDK. if you want you can join to my test server to try: mc.crossfire.es

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Sep 9, 2018
  12. Offline

    bergerkiller

  13. Offline

    BlancoLanda

    @bergerkiller Thank you, do you know any other tool that I can use meanwhile? :/
     
  14. Offline

    bergerkiller

    @BlancoLanda quick google search gave me this:
    MinecartPermanence

    But it's a bit old. Also, no issues here, the train simply returned to where it came from. Also, NoLagg works in combi with it: it will keep chunks loaded for a bit longer when minecart passes through. Nice side effect from using chunkload. :)

    Also, it's hard to mess this up...
    Code:
                //Unloaded chunk handling
                SimpleChunk[] unloaded = mg.getNearChunks(false, true);
                if (unloaded.length > 0) {
                    if (TrainCarts.keepChunksLoaded) {
                        for (SimpleChunk c : unloaded) c.load();
                    } else {
                        GroupManager.hideGroup(mg);
                    }
                }
    Only possible way this can fail, is if the task generates an exception and stops working. Did you get anything in the console/log?
     
  15. Offline

    BlancoLanda

    @bergerkiller how do you configure nolagg for load chunks for a bit longer?
     
  16. Offline

    bergerkiller

  17. Offline

    bergerkiller

    Ok expect the following features/updates:
    - Train property changing signs, such as tags, linkable, collide, mobenter and slowdown
    - Train slowdown property (do NOT apply for slopes!)
    - Collide property separate from linking: you can allow linking while denying collisions.
    - Default properties applied to spawned trains.
     
  18. Offline

    BlancoLanda

    Well berger thank you for your help! Finally (idk how) I cought have my station working fine... ^^
     
  19. Offline

    bergerkiller

    Updated it to 1.38, also updated the WIKI page. You can now set properties through redstone! :)
    This means, you could use buttons to set train destinations, by letting these buttons set a tag on the train. Endless possibilities from now on. :D

    Urgent: re-upload, the first one I uploaded was a debug one, and 2 others downloaded one dubbed the 'WTF2' update, since it had this message broadcasted whenever you used a property sign... [skeleton]

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  20. Did you forget Auto-Spawning every X minutes? :p
     
  21. Offline

    bergerkiller

    @szoller I didn't, simply have no more room on the spawn sign to add a time...for now you can use a redstone clock (a long one)
     
  22. Couldn you add a timer-sign that I can connect via Redstone?
    For my purposes, one Line for traint type (psmmm etc.) is enough :p
     
  23. Offline

    bergerkiller

    Well the problem is that the chunk needs to stay loaded for that to even work...so it's hard to think of something. You can place a minecart nearby to keep it loaded though. Perhaps a dispenser dropping blocks on a pressure plate, creating a 5 min interval? xd
     
  24. I just would need for example each 5 Min a train on my metro lines... :D

    Or a way to have trains available without
    a) Waiting too long
    b) creating spawners on all the stations...
     
  25. Offline

    Rigeborod

    Great thanks, bergerkiller, for this addon. Now it works almost fine for me. I have a redstone clock before the first train station, creating a new train and launching it (every 20 secs). Then at the end of the trip (after the last station) the train is destroyed. It works fine at this part.

    And now here's some feature requests.
    1) You have an "ejector sign" with a very good "move 3 titles in X direction and 1 in Z" functionality. It would be very useful for the same thing at the stations. Different stations need different player-moving-directions not just the default one from the properties file.
    2) Being able to lock the player in the minecart while it's not at the station (and an ability for player to escape if something went wrong and he/she is locked forever)
    3) Garbage collection for not only the carts out of the track, but also for carts, not moving while not at the station and on the regular rail. Be careful! All the carts in one train should meet the requirements.
    4) combining station and tag functionality. Let us imagine we can create a station with name "St1" (/createStation St1). Then Add tags to that station (/stationAddTags St1 a b c d). Then any player can use /station St1 while sitting in the train to set the right tags and so to set the right route. Also station can auto eject players if they have set this station via command.

    Marked bold the most desirable one.

    By the way. combining the first and the second line in the command signs you can save plenty of place for options.
    For example:
    [train-eject]
    4/1/1
    It will add a room for the timer at [train-spawn] sign and more! :)
     
  26. Offline

    Omen

    any way to set the owner of a train via sign?
    or any way to set the owner of spawned trains?
     
  27. Offline

    stertingen

    i like your plugin, but it behaves wired when a train with 2 powered minecarts arrive at a station ([train] - station - 20 - left - both sides powered). and powered minecarts seem to have an unlimited stock of coal.
    and i have a feature request: let users buy tickets to be allowed to get into a train. (economy, citizens?)
     
  28. Offline

    DeathQueen

    There is already a plugin that lets you charge people to get into minecarts. It's an unneeded addition to this plugin.
     
  29. Offline

    Leendert

    I did just an update of my home craftbukkit server. So latest stable CB build and latest TrainCarts. But there seems to be a bug with the one side powered stations (sign with only [train] and station). From both directions the train stops at the station instead of running over or reversing direction.
     
  30. Offline

    DeathQueen

    Why would it do what you said?
     
  31. Offline

    Leendert

    that's how it worked in the previous builds as you can see in the video's about the stations in the startpost.
     

Share This Page