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

    @dockter ow that not selected train must be because the global commands are executed before the cart/train commands. It simply continues afterwards.

    @robxu9 Thanks, spotted the error. Happens when any type of sign is powered by redstone but has no tracks above, will fix that.
     
  3. Offline

    MechanID

    I have problem - trains not saved after server shutdown, i see saved trains TrainProperties.yml but after server start no trains spawned.
    i use TrainCarts 1.6 BETA v3 and Craftbukkit version git-Bukkit-1.0.1-R1-b1597jnks (MC: 1.0.1)
     
  4. Offline

    watar

    Upgraded to 1.6 beta3 and the server loads seems to stay normal :)
    But now I can't place any new destination signs. The old ones already placed works but only if I type /train dest xxx not if I put up a sign at the start of the track and punch it.
    Using
    Code:
    [train]
    destination
    watar
    No confirmation message and the destination doesn't work :(

    Also, if i place a redstone torch close to a sign this shows up in the console
     
  5. Offline

    bergerkiller

    @watar The second error has been resolved here, and I'll fix the destinations issue. It's because Thulinma uses [destination] on the first line, without [train] or [cart]. I'll fix that to be more universal.
     
  6. Offline

    _frozen

    @bergerkiller:

    Can you clarify on the switcher part:

    Example: Sign says:
    [train]
    switcher
    empty
    ????

    How do I assign empty carts to go left or right, with the occupied carts going straight? Can you help with that? I m not sure how to turn the cart in this system right now. Or is it:

    0/1/0 = straight
    1/0/0 = left
    0/0/1 = right
     
  7. Offline

    bergerkiller

    Made a video just now, it's uploading...
     
  8. Offline

    _frozen

    Also: How would one assign broad defaults to a train? Rename it with a tag? For example, I want default carts to behave like vanilla carts, with specific carts set by signs to behave like "metro"? If I were capable of modding this, I would do the following:

    To enable this, you have to make a sign for a property setting the broad defaults. Lets call this "preset" variable.

    [train]/property/preset/metro will enable the whole train to look at metro settings instead of default settings in a yml file (probably within presetflags.yml). Would this be easily implemented?

    That way, I dont have to spam the area surrounding my spawner with signs to set speed, slowdown, and the like.
     
  9. Offline

    bergerkiller

    @_frozen There are train property defaults present that allow you to do this, although not sure if I added a command for it to load defaults...
    You can use the property signs to load defaults though, and it's possible to disable linking of default minecarts to make them act vanilla. Using permissions it is possible to deny them from accessing the train/cart commands or build signs. You can also set the default cart owner for the train in the DefaultTrainProperties.yml file.

    Also, a video of how destinations and stations work. The switcher is somewhat the same, only difference is that you can use tags/properties of the cart/train to switch.
     
  10. Offline

    _frozen

    never mind. Found this: setdefault/default
    Sets all properties of the train to a default found in defaultflags.yml. The default node to use on the fourth line. So basically, make a new node and it should do what I asked.
     
  11. Offline

    bergerkiller

    @_frozen yup. If you use the 1.6 beta version, note that some file names got changed in favor of cleaning up unused nodes, etc. Most of it is still the same though. Now adding a /train default command.
     
  12. Offline

    _frozen

    Here with 1.6 beta (downloaded a hour ago.. I think its 1.6. beta 3) I will have to confirm that making destination signs does not work.
     
  13. Offline

    bergerkiller

    @_frozen true, it was partially broken. (fixed here though)
    I'll look at the ejector and upload beta v4.
     
  14. Offline

    _frozen

    Dont bother with the ejector, it was my stupid mistake (sign was buried into the stone above and the line said [train[ )
     
  15. Offline

    MacGyver420

    With the new sign placement, is it just either side and under the block the track sits on, or do the underneath corners work as well? Like left and right of the bottom sign, but under the track block. The sides of my track blocks aren't really exposed so id like to stick everything underneath.
     
  16. Offline

    bergerkiller

    @MacGyver420 You can put them underneath the tracks, but also attached to the block that carries the rails. The video shows both uses (below track for switcher signs, attached to track block for station and destination)

    You can now assign 3-4 signs per rails max.
     
  17. Offline

    _frozen

    sorry to nag you again, but I believe I spotted an bug. the property slowdown does not work, even if it is false. the carts will always slow down (maybe 200-300blocks down the track, but it will slow down.)

    I have a server you can check and test it on, send me a PM.

    in defaultflags.yml the following is for the metro default set:

    speedLimit: 1.4
    slowDown: false

    edit: updated to beta 4; seems like it broke my spawning system? under previous betas no problems, now carts looks like they fell off the spawning tracks.

    edit 2: even stranger. my union station has 5 lines starting/terminating at the station. out of 5, 4 works fine with the spawner (albeit much slower reaction this time) -- meaning, it launches. the fifth, the "blue line", does not launch properly. Instead, it launches backward.
     
  18. Offline

    MechanID

    Please can someone check are trains saved and loaded good during seerver stop and start ?
    Because i have problem no trains loaded at all
     
  19. Offline

    bergerkiller

    @MechanID I'll look at it, it's possible that something broke along the way.

    EDIT

    Yup you are right, the groups are saved before they are despawned. Fixing...
     
  20. Offline

    xcanner

    @bergerkiller is the new destination code in TrainCarts 1.6 BETA v4.rar?
    Im still having problems with 1 of my metrosystems, you can drive from main station and out, but not the other way.
     
  21. Offline

    bergerkiller

    @xcanner Yeah v4 has the latest. However, still waiting for @Thulinma to upload his (possibly) fixed code.
    If you have issues, you can use /train reroute to make the plugin recalculate everything. (otherwise it may just pick the wrong route because that junction was already processed)

    Uploaded beta v5, it now correctly saves trains to file again. The destinations system got slightly changed to keep it alive when a switcher sign is used under a sloped piece of track. (thanks Thulinma for noticing it)

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

    DiscoPudding

    Hey. I am having trouble getting train portals to work.
    When I create the portal (like in your video) and power it, it get a message "you have created a train portal" then I create the destination, same message. When I send the train towards the portal, it does not teleport.
    When I use a portal block, I can get the train to tp however sometimes it arrives at the sign (underground) and sometimes it teleports a couple of times and then materializes in the sign.
    I am using craftbukkit 1575 myworld 1.33 had the same problem with traincarts 1.54 and 1.6b4
    any thoughts?
     
  23. Offline

    bergerkiller

    @DiscoPudding does this happen all the time or only when you teleport the train while there are passengers inside?
     
  24. Offline

    DiscoPudding

    When I am in the cart, it doesnt work at all. When I get out I can use the portal (with portal blocks)
    When I send the cart by itself they teleport and can be seen travelling along underneath the tracks. They do a loop like that. 2012-01-04_20.08.00.png
     
  25. Offline

    bergerkiller

    @DiscoPudding looks like a spawn placement bug is occuring...
    Does the train spawner sign also have this issue, or similar? I'll definitely look into this tomorrow (I'm going to sleep )
     
  26. Offline

    DiscoPudding

    Spawner seems to work fine. Another note: when the carts get stuck at the portal sign, I cant break them or the sign. The only thing I can do is break the block below. When I do that it removes the carts and the sign but not the portal.
     
  27. Offline

    xcanner

    @bergerkiller minecart "crashes" into nearby wall (DEV version 6)
    [​IMG]
     
  28. Offline

    Tobsy4inc

    What makes the train carts so hard to use is that when I spawn a train it never shows up and makes my server crash. I personally think you should keep the old version but incorporate the station ideas (love it)

    or
    Ask people that know how to use it to make tutorials on you-tube. I can only find advertisements and what it looks like after it's placed.

    from Tobsy4inc

    p.s this is a cool plugin
     
  29. Offline

    xcanner

    I believe @_frozen use spawned minecarts on his server, maybe you can ask him how or maybe you can get access to his server to see it (i dont use it myself).
     
  30. Offline

    MechanID

    @bergerkiller i have same issue as @xcanner, also only single minecarts stuck near corner, trains pass without problems.
     
  31. Offline

    bergerkiller

    @Tobsy4inc how do you mean crash when spawning a train? Do you mean the train spawner? Or do you mean whenever two minecarts collide? (I have no crashing issues whatsoever, so no idea what problems you are having)

    And all you really have to do is place the .jar file in the plugins folder, no other settings need to be changed really. What CB version do you use? Did you try 1.6 b 4/5 on CB 1575 or cb 1619 or later? If you use 1337 then I can understand you have crashing issues...

    @xcanner @MechanID Ok I'll look at the isTurned and block collide event.

    EDIT

    Uploaded beta 6, only really changed 1 line though. (and some possible fixes/changes I did previously) Should get rid of the block-colliding issue (I hope), if not reply.
     

Share This Page