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

    kinkinhood

    Ah ok. That makes more sense.
     
  3. Offline

    andrewpo

    :( The server owner disabled traincarts because when the server starts up, it hangs on loading TC for a few minutes; and same during a /reload. (Reference: http://theshire.forumcommunity.net/?t=46306646&p=347533555)

    Also the server freezes up for a while (sometimes crashes) whenever a cart comes to a tag switcher.

    Bukkit 1.1 R3, TC 1.6 beta 22

    Edit: bergerkiller - As a suggestion: Can pitch/yaw (head rotation/player rotation) be added to the eject all sign please?

    + Very rarely trains go 'off centre' on the rail, they begin to float to the left or right; sometimes going into walls.
     
  4. Offline

    bergerkiller

    andrewpo Mhhh could you ask him what size the 'trains.groupdata' file was? Did it show a
    'x trains loaded (y minecarts)' message, or not? I guess I should add a train cap to abort loading these files if the trains are with too many.

    And yes, I can add the yaw and pitch as setting for the 4th line.
     
  5. Offline

    blubberdiblub

    bergerkiller - Thank you very much for the update, our rollercoaster (minecart properly reversing on sloped tracks) is working again :D
     
  6. Offline

    andrewpo

    I've emailed the server owner, will hopefully get a response soon.

    Thanks for the pitch + yaw; much appreciated! =) Can make players face 'welcome to X' signs when they're ejected with that implemented :D


    config.yml - http://pastebin.com/PJK0U9PA
    defaulttrainproperties - http://pastebin.com/E2LS5Nnp
    destinations.yml - http://pastebin.com/8rPubRui
    permissiondefaults - http://pastebin.com/m0uCCLYj
    trainproperties.yml - 2 blank lines


    I uploaded the contents of the YML files for traincarts to pastebin.com

    Response from server owner: "A mere 559 B. there were no error messages, console was fried. As soon as I disabled Train Carts, the server loaded."

    Also as a side-note, is it possible to get rid of trains that are:
    (1) Stationary/not moving
    (2) no set destination
    every minute/30 secs? Provided they're not on a station sign

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

    bergerkiller

    andrewpo mmh does he still have the server log (or part of the server log) when it happened? Hopefully I can narrow down the cause a bit better...since it didn't load, I suspect an infinite loop. Therefore I am checking all for/while loops just in case one can be infinite.

    And yeah, train cleanup is one of my things on my current To-Do list, though I need to figure out a way to make it usable in many cases. (for example, remove all trains owned by player x, etc.)
     
  8. Offline

    Tic0

    Hey guys,

    I've got a little problem. I've installed everything, (train cart, signlink & BKLib) but it won't work.
    If I create a spawner, I also get a text message that I created a spawner.
    But if I press the button nothing happens. Its 100% connected with Redstone.
    Also it's in a free space area.

    my Server runs atm craftbukkit-1.1-R3 and I've got no Error Message in the Loading time in the console.

    So, what's wrong here? :(

    [edit]
    I also tried different versions, still it won't work for me.
    Atm I use 1.53 Train Cart & 1.15 SignLink.
    I tried the newest Versions as well, but it wont work. :<
     
  9. Offline

    CrazyOlli

    Hi there,

    i've a question. I use traincarts with the Essentials GroupManager Plugin and i want to give one Person who don't have Op-Status on server the rights to use the admin commands from the train Plugins. Where i have to give them the rights to do this? Can i handle this with the group manager permissions plugin from essentials?

    I didn't found something :-(

    Thanks for help.

    Olli
     
  10. Offline

    andrewpo

    Give them the train.* node.
     
  11. Offline

    bergerkiller

    Tic0 Did you place the sign with the text facing into the direction you want to spawn? Is the sign directly below or directly attached to the rails, or a block / 2 blocks below the rails?
     
  12. Offline

    andrewpo

    Hey

    Any luck with checking for possible inf. loops? I'm still trying to get a message to an admin of the server (I'm on awful temperamental mobile broadband, in the middle of nowhere) but it's proving difficult since I can't catch him on Skype + have no email.

    Will get back to you ASAP when I receive a reply.

    Thanks for all your help
     
  13. Offline

    Tic0

    @bergerkiller
    Yes, I played it in the right direction, tried both ways.
    I played the sign as in the video guide. I try to explain it here...

    <- Rail
    X Grass Block
    _ Sign
    X Grass Block

    Then I connected the sign via Redstone with a Stone together with a Buttom.
    I really don't know why it won't work. I don't get any error or something.
    Both Plug-ins got "enabeled" on the server start.
     
  14. Offline

    bergerkiller

    Tic0 what version do you use right now? And what CraftBukkit build? (maybe a screenshot can help me further)
     
  15. Offline

    Steffion

    Does this work for R-4??
     
  16. Offline

    Tic0

    i tried different setups, I used the R4 #1938 with the newest TrainCart version. Then I tried
    the R4 #1938 with some older TrainCart version but it still didn't work.

    I plan to try the 1846 Bukkit Version with the 1.6 v23 TrainCart later on, maybe this will work.

    I'll try to take a picture and post it then!

    Thanks so far for your help.

    [edit]
    Tried it now with the 1846 & 1.6 v23 Train Cart Version and it still won't work.

    Picture:
    http://s14.directupload.net/images/120217/gwxqed6g.png

    I wrote the following on the sign:
    [train]
    spawn 5
    pmm
     
  17. Offline

    bergerkiller

    redstonefail.png
    Tic0 Um it appears that you need to have the redstone lead to the sign now...wasn't like that all the time though...must be the fixed-up redstone power checks.
     
  18. Offline

    kinkinhood

    Something worth mentioning, the chest pull will remove enchantments from an item
     
  19. Offline

    bergerkiller

    kinkinhood Ah ok, I'll update the function in the common lib to make it transfer those as well.
     
  20. Offline

    andrewpo

    Could you possibly add something like [@train] or [#train] to make it check for power to the block underneath?
    Similar to how [!train] makes it not need powering.

    I'm no Java expert but something like....

    if(sign.getLine(1).equalsIgnoreCase("[@train]")) {
    //check for power to block underneath
    } else {
    //check for power directly to the sign
    }

    maybe? D:
     
  21. Offline

    Tic0

    @bergerkiller
    You're right! That's the problem. I tried it again with the redstone facing exactly to the sign and now it works :)
    Thank you very much for your help :)

    Finally I can enjoy your great plug-in.
     
  22. Offline

    bergerkiller

    andrewpo I know a simpler method:
    1. Check if the attached block is powered
    2. If powered, check all surrounding faces of this block for redstone torches and others, but NOT levers
    I simply haven't added it yet...
     
  23. Offline

    Celtic Minstrel

    Make sure to use addUnsafeEnchantments if you're copying items. ;)
     
  24. Offline

    bergerkiller

    Celtic Minstel nah I simply copy the enchantments over raw (in native coding); copying the ID and level. It is all added already. :)
     
  25. Offline

    Celtic Minstrel

    Well, the point is don't check whether the enchantment is valid on the item. :p
     
  26. Offline

    CrazyOlli

    Okay, i tried this, gave them this node but nothing happens, he get no access to the options. maybe i'm so noobish to fail handling with permissions and other stuff. i don't know ;(

    Next question: I've a long rail system. one route is about 800m log. if i get by train the maxspeed signs works fine. if the train is empty the train get slower after 100m. is this a bug or wrong settings?

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

    bergerkiller

    CrazyOlli In the configuration you can set if empty carts slow down faster or not:
    But, I'll check if this is correctly used.

    EDIT

    Uploaded a new beta version which is compatible with the latest CB build. Also fixes several reported errors and/or problems.
     
  28. Offline

    andrewpo

    [In your users.yml file



    Code:
    users:
      PLAYERNAME:
        subgroups: []
        permissions:
        - train.*
        group: Default
    
    Then save your users.yml file and use the /manload command



    or better yet.... here's a command that should work:
    Code:
    /manaddp PLAYERNAME train.*
     
  29. Offline

    _Alf

    Oh i really like this plugin! I'm currently building up a large railroadsystem on my server and beforehand building the neccessary redstone circuits, i'm wondering if Minecraft is able to handle 100+ or 200+ single minecarts (speaking of just 10 trains with 10 carts in each for example ;) ) [tnt] ;)
     
  30. Offline

    bergerkiller

    _Alf easily, but it may become harder if they also keep nearby chunks loaded. (depends on how many chunks it has to load)
     
  31. Offline

    PenzRules

    I posted you some screenshots per ticket. They show some strange things tested with beta24v2.
    Hope it wasn't FAIL to post per ticket. If anyone want's to see the screenshots I may post the links.
    I would really like to see players in minecarts teleporting properly, so I hope I can help with some testing.
    Greetings. :)
     

Share This Page