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

    MacGyver420

    bergerkiller

    i don't have keep spawn in memory disabled, but still pages and pages of carts are missing. I still havent been able to reproduce it on my own, but my server sure can while im not paying attention... Only things ive seen is a cart physics error will fire, then almost constant spam about the same trains missing carts. Sometimes the spam will come after a teleport, sometimes after someone joins vanished. All ive been able to figure out is if im in the train, it wont happen.
     
  3. Offline

    bergerkiller

    MacGyver420 yeah I know it is an issue right when the train is about to be unloaded in the chunk. I believe the replacement of the carts is faulty, but I'll have to do more thorough testing to check this. All I know is that carts end up wrongly replaced when trains are restored again.
     
  4. Offline

    bttws

    Hi there, any chance of adding elevators like what was in Minecart mania in the future?
    thanks, for being a awesome plugin dev!
    -bttws
     
  5. Offline

    bergerkiller

    bttws Well it currently is already possible using portals, but I guess there is no harm in adding a teleport functionality like that as well. The API makes it possible to teleport trains with great ease.
     
  6. bergerkiller: just did another trial run and it seems to work as expected now ;) thanks for the support. now its coalpower time !
     
  7. Offline

    Sebastian_Pking

    bergerkiller
    I have a question to TranCartBlocks Station.

    If i set an unpowered Obsidian block it stops the train.
    powered Obsidian block it don't stops the train but give them a boost.

    How I can set this block that it stops and after 10 sec it launched the train?

    Thx
     
  8. Offline

    bttws

    Thanks! We use multiverse, so we cant use myworlds, that would add much needed train teleporting.
     
  9. Offline

    untergrundbiber

  10. Offline

    bergerkiller

    untergrundbiber known issue, still working on a way to fix this. It is the main cause trains get either duplicated or deleted, something with chunks unloading wrongly.
     
  11. Offline

    000topgear000

    there was no TrainCarts.jar in the thing i downloaded, help
     
  12. Offline

    untergrundbiber

  13. Offline

    bergerkiller

    Good news: Found out why it was failing. It wasn't correctly comparing the SAME MinecartGroup objects, which caused hundreds of the same group to be added to the same set. In turn, this caused all sorts of strange bugs throughout the plugin, including the storage. The error seems to be resolved now, but it doesn't properly resume moving after restoring the train.

    Updated to v1.64. Storage bug is now fixed (missing cart stuff) and added elevator sign, and other bugfixes. I'll make the elevator page on the WIKI a bit more clear tomorrow.

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

    bttws

    Thanks!
     
  15. Offline

    CommanderGizmo

    Hey, I tried to search this thread, but the forum searches all threads instead. Can you clarify the TrainCartsBlocks usage? Is it only station and eject that can use blocks? Can we still use signs to control how the block acts like in MinecartMania? When you say it's compatible with MM, do you mean along side it or as a replacement (since it's outdated)?

    My concern is that building a railroad without the blocks is too cheap and removes the one use for gold we ever found (boosters). Is it possible to add a fee for creating some signs?

    I'm just getting started playing around with this. Thanks for the hard work! This plugin looks awesome!

    [EDIT]
    I think I may have found a bug. It looks like if I place a station at the east end of an east-west track with the text:
    Code:
    [cart]
    station
    Then if I power the west side of the sign, the cart will go east unless I have one additional track piece on the east side of the station track.
     
  16. Offline

    bergerkiller

    CommanderGizmo
    Using signs with blocks is useless, just use the sign versions then. Blocks are blocks and blocks alone, built for simplicity.

    I should remove the compatible line thing, as I had to remove compatibility a while ago after events got broken, but I try to mimic MM as best as I can. But I am not going to continue every single aspect of that plugin, such as multiple signs to change one little property. If you want to control stations in an advanced matter, just add a station sign and use redstone to control it, adding multiple signs around it like 'left' and 'right' which control a nearby gold block is just weird and really isn't realistic either.

    The cart station thing appeared to work fine when I tested, maybe a screenshot of the set-up could explain better what is happening.
     
  17. Offline

    CommanderGizmo

    I'll see if I can get you a screen shot when I get back to my desk. I was thinking of just using the blocks as a requirement on which to attach the sign or the sign would be ignored. A way of costing you something for building the railway. On the other hand, perhaps they'll be happy with a more free style approach.
     
  18. bergerkiller : first of all - thanks for the continues updates and fixes. I added NoLagg to my server too as it seems You perfectly know what You're doing when it comes to coding plugins.

    I have a small technical/design question tho: I'm trying to build a main station but need an idea for layout / sign placement to have the players choose a destination. Right now i spawn a train when someone steps on a pressure plate - train goes to a station and waits 10s for ppl to hop in and then it goes to 2 destinations. how can i implement choice for the players - say, have one go to one place and another to a different ?
     
  19. Offline

    bergerkiller

    g_BonE Well you can use the destination sign. After clicking or powering it (or use a property sign ofc) it will change the destination set on the train. You probably can't prevent using up lots of redstone wiring though, but with clever placement you can make it simple nevertheless.

    The 'click destination sign to affect train' idea works, but is a bit weird as it affects the train you previously entered or clicked. So it is prone to errors.
     
  20. How do waiter signs work? please I need to use them for a high speed line.
     
  21. Offline

    bergerkiller

    JM120897 You place them underneath the rails and works sorta like the blocker sign. But, again, it is in a very early WIP state.
    The directional thing is a bit failing, but expect it to work the same as the blocker sign. Train looks at wait sign - checks tracks ahead for other trains - no trains = no change, train = wait. (and blocked)
     
  22. Ok, thank you, I'll test it out
     
  23. Offline

    bergerkiller

    JM120897 Forgot to mention, to set the distance ahead to wait for:
    25 being the blocks ahead to wait for trains. By default this is 100.
     
  24. bergerkiller thank you I had been testing it (without wait 25) and it didn't work properly
     
  25. Offline

    derfuzzi

    bergerkiller
    How can I keep Spawn in Memory? I am a little bit stupid :p
     
  26. Offline

    bergerkiller

    derfuzzi no longer applies (I think), now that I fixed some of the storage issues.
     
  27. Offline

    Killburner

    I'm using the latest version of bPermissions and only Ops can place train/cart signs. All of my other plugins seem to respect permission nodes.

    Initially I added train.build.*, but I get a permissions errors even if I add the seperate nodes.

    Code:
        - train.build.destination
        - train.build.destructor
        - train.build.ejector
        - train.build.pushHandler
        - train.build.spawner
        - train.build.station
        - train.build.tagswitcher
        - train.build.trigger
        - train.properties.default
    Any thoughts?
     
  28. Offline

    CommanderGizmo

    I also had some trouble using PEX. It appears that the two wiki's combined don't offer the full picture. I went to the source and copied the permission nodes directly.

    Code:
        - train.build.destination
        - train.build.destructor
        - train.build.detector
        - train.build.ejector
        - train.build.property
        - train.build.collector
        - train.build.depositor
        - train.build.elevator
        - train.build.pushHandler
        - train.build.spawner
        - train.build.station
        - train.build.switcher
        - train.build.trigger
        - train.build.teleporter
        - train.build.blocker
        - train.build.wait
        - train.build.crafter
        - train.properties.default
    Just delete the ones you don't want. I also noticed that after updating the permissions I have to do a reload or stop and start the server entirely before TC will recognize the change. Maybe it's caching permissions or something?


    Also, another feature request:
    I cannot seem to get consistant results with loading furnaces. At times, setting a limit such as 16 cobblestone yields all four furnaces in range of a sign having 16 cobble each after four passes. Yet at other times I get one furnace with 64 cobble and three empty ones. What is the deciding factor for this behavior, and can you make it consistently one way or the other? I'd prefer to chose if possible by the content of the sign.

    Just to clarify, this is different that my idea of splitting it up automatically. I am referring to each time a train (or the same one) passes the same sign that has multiple furnaces next to it.
     
  29. Offline

    Killburner

    Ah yes, that was the problem. The switcher permission must have been older (?), and I had just assumed that none of them were working. Thanks for pointing me in the right direction.
     
  30. Offline

    Newpoman

    I upgraded from 1.63 to 1.64. And all my stations and switchers stopped working again. I went back to version 1.63 and they work again but still getting that warning message from train carts not found.
     
  31. Offline

    Killburner

    I noticed the same thing with switchers yesterday, after upgrading.
     

Share This Page