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

    robxu9

    How did you do your defaultflags.yml? Because I'm having no luck :(
     
  3. Offline

    Sneaky420

    default:
    owners: &id001 [TrainConductor420]


    admin:
    owners: TrainConductor420

    That made it work :)
     
  4. Offline

    Aqua77

    ok, now i am really close to give up after hours of trying to get this plugin to work on my server.
    First of all, when i read the features of this plugin, it sounds like a great plugin. i was using minecart mania before.

    My server configuration:
    Bukkit 1337, Spout 510, TrainCarts 1.47

    I can´t get a station to work. Its exactly the same configuration as in the video or as written in the description.
    I tried the automated station, with powered station sign (both sides), a delay of 5 and continue on the 4th line.
    By the way, i am not getting the [] brackets on my sign.
    I have also tried to set these brackets by myself with no effect on the station. trains are not stopping there. And so they are not getting launched after a delay of 5 seconds.

    First line: train
    second line: station
    third line: 5
    fourth line: continue

    I am also having the problem of spawning minecarts.

    [INFO] [TrainCarts] SignLink detected, support for arrival signs added!
    [INFO] [TrainCarts] 119 Trains have been loaded in 1 world. (119 Minecarts) [INFO] [TrainCarts] version 1.47 is enabled!

    There has been exactly 1 minecart (train) on the track before restarting the server.

    Really just one minecart. I tried a combination of 3 carts as well, but the station has no function on my server.
    After a restart (stopping the server, starting the server) i have additional 118 carts in my world.

    Hopefully anyone can help me with this problem. Meanwhile i will have to delete this great plugin (when working)
    from my server.
     
  5. Offline

    bergerkiller

    @Aqua77 you need to use [train] on the first line, not train. :)
    Not sure about the minecarts, but note that it creates a group (train) for lone minecarts too. It is possible that there are 119 single minecarts on the world, which explains the 119 trains.

    You can use:
    To get rid of them.
     
  6. Offline

    Aqua77

    @bergerkiller thanks. I feel a little dumb now, but thats ok for a working plugin like yours.

    The minecarts definately wasn´t there before. its a fresh server and i have created all minecarts by myself. And i have not created more than 100 :) just 5.

    Btw, i have a station now. And i felt like "i have made fire".
    Unfortunately i am still not happy. The minecart (i just try it with one on a loop) stops at the station, but its not launched. Not manually by activating just one side of the sign with redstone, not automatically (my prefered method) when there is a delay on the sign. It just stands still on the station.

    I have set slowdown to false with the hope that it would remain at topspeed even when there is a hill to climb. But i think i am wrong with that. So i need booster rails?

    Thanks for your help.
     
  7. Offline

    bergerkiller

    @Aqua77 what are the lines on the sign as for now? Are you powering both sides with a redstone wire or with a redstone torch?
    This, with a redstone torch on both sides, works for me:
    It waits for 5 seconds and continues.
     
  8. Offline

    Aqua77

    @bergerkiller
    It was with redstone wire.
    Now it is with redstone torches. And the sign is:

    [train]
    station
    3
    continue

    I push the cart from the station, it loops, stops at the station and thats it.
    Do i have to set any tags or whatever else which i might have forgot?
     
  9. Offline

    Chett

    sorry, but, lol...jesus brackets dude, brackets! :)

    And Berger, i noticed that "/train destroyall" did not work with 1.45 properly, it only destroyed nearbys. If i included "/train destroyall Worldname" it was better, but in a few cases still a few Carts were remaining in my Main World (didnt check my other worlds).

    Didnt test 1.47, busy with n other Plug *smile*. But Dude, you rock. Love your Plugs.


    Push it from 2 or 3 blocks away from the station to the block powered and marked as station. And it has to be a minimum of "push" speed to work with continue...if u push to less it still does not know from where the Cart came and dont know in which direction to go now. Sorry for my english...not my native ;)

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

    Aqua77

    Now its working.
    i think the problem is 1 cart. I tried the same configuration again with 3 carts and its working perfectly.
     
  11. Offline

    bergerkiller

    @Chett that is obvious, minecarts in unloaded chunks are not visible. I can't possibly go and load all available chunks and clear them, that's overkill. :)

    Also, updated.
     
  12. Offline

    Chett

    Ah sure, didnt rly think bout how the mechanic works, ur right sir. ;)

    EDIT

    Hm, when i think bout. Shouldnt Carts just have n ID when created and if u delete the Main ID/ID's it does not matter if they are visible or not, when using a destroy command (if hooked in, in the right place of the code ?)

    Edit2:

    think i got it, but that sucks ;)
     
  13. Offline

    mrgreaper

    Thank you majorly appreciated, this looks like an awsome plugin

    what permission node allows players to use the property change signs? ie


    Code:
    [train]
    property
    destination
    TestB 
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  14. Offline

    bergerkiller

    @mrgreaper The build node:
     
  15. Offline

    mrgreaper

    Thnx ... I did look at the wikki and got the other permissions sorted.. No idea how I missed that one lol


    ah now im on my pc i see how i missed it, you may want to add it to the wikki :)
     
  16. Offline

    dog.big

    Hello,
    could you add the max-lenght property to your excelent plugin?
    We need to use it as we have too long train after server restart in our automatic subway system and need to -cleanup.
    Or could you simply add the chance of remove all trains when disabling plugin?
    Thanks
     
  17. Offline

    bergerkiller

    @dog.big why not disable linking for this train; prevents it from growing larger.
     
  18. Offline

    dog.big

    but it will stop and collide with others after restart, that why i need this featuer
     
  19. Offline

    bergerkiller

    @dog.big it will stop collisions yes. If linking is disabled in one of the trains, the two trains can't link.
     
  20. Offline

    dog.big

    but after restart, the moving trains become not moving which is bad for our subway system
     
  21. Offline

    bergerkiller

    @dog.big in that case set 'keepChunksLoaded' on those trains to true. It will then activate the trains regardless of if they are in unloaded chunks or not. Although, I'll do check if this is the case.

    EDIT

    Yup not the case. I'll fix it in the next version.
     
  22. Offline

    HalestormXV

    @bergerkiller

    Getting some strange errors with this plugin:
    Code:
    2011-11-06 12:14:07 [INFO] [TrainCarts] SignLink detected, support for arrival signs added!
    2011-11-06 12:14:07 [INFO] [TrainCarts] MyWorlds detected, support for portal sign train teleportation added!
    2011-11-06 12:14:07 [INFO] [Configuration] Error while loading file 'plugins/Train Carts/config.yml':
    2011-11-06 12:14:07 [SEVERE] java.io.FileNotFoundException: plugins/Train Carts/config.yml (No such file or directory)
    2011-11-06 12:14:07 [SEVERE]     at java.io.FileInputStream.open(Native Method)
    2011-11-06 12:14:07 [SEVERE]     at java.io.FileInputStream.<init>(Unknown Source)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:109)
    2011-11-06 12:14:07 [SEVERE]     at com.bergerkiller.bukkit.tc.Configuration.load(Configuration.java:44)
    2011-11-06 12:14:07 [SEVERE]     at com.bergerkiller.bukkit.tc.TrainCarts.loadConfig(TrainCarts.java:69)
    2011-11-06 12:14:07 [SEVERE]     at com.bergerkiller.bukkit.tc.TrainCarts.onEnable(TrainCarts.java:132)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:174)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:957)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:171)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:154)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    2011-11-06 12:14:07 [INFO] [Configuration] Error while loading file 'plugins/Train Carts/trainflags.yml':
    2011-11-06 12:14:07 [SEVERE] java.io.FileNotFoundException: plugins/Train Carts/trainflags.yml (No such file or directory)
    2011-11-06 12:14:07 [SEVERE]     at java.io.FileInputStream.open(Native Method)
    2011-11-06 12:14:07 [SEVERE]     at java.io.FileInputStream.<init>(Unknown Source)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:109)
    2011-11-06 12:14:07 [SEVERE]     at com.bergerkiller.bukkit.tc.Configuration.load(Configuration.java:44)
    2011-11-06 12:14:07 [SEVERE]     at com.bergerkiller.bukkit.tc.TrainProperties.load(TrainProperties.java:289)
    2011-11-06 12:14:07 [SEVERE]     at com.bergerkiller.bukkit.tc.TrainCarts.onEnable(TrainCarts.java:138)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:174)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:957)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:171)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:154)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    2011-11-06 12:14:07 [INFO] [Configuration] Error while loading file 'plugins/Train Carts/destinations.yml':
    2011-11-06 12:14:07 [SEVERE] java.io.FileNotFoundException: plugins/Train Carts/destinations.yml (No such file or directory)
    2011-11-06 12:14:07 [SEVERE]     at java.io.FileInputStream.open(Native Method)
    2011-11-06 12:14:07 [SEVERE]     at java.io.FileInputStream.<init>(Unknown Source)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:109)
    2011-11-06 12:14:07 [SEVERE]     at com.bergerkiller.bukkit.tc.Configuration.load(Configuration.java:44)
    2011-11-06 12:14:07 [SEVERE]     at com.bergerkiller.bukkit.tc.Destinations.load(Destinations.java:37)
    2011-11-06 12:14:07 [SEVERE]     at com.bergerkiller.bukkit.tc.TrainCarts.onEnable(TrainCarts.java:141)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:174)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:957)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:171)
    2011-11-06 12:14:07 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:154)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
    2011-11-06 12:14:07 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    2011-11-06 12:14:08 [INFO] [TrainCarts] File not found, it is not loaded: plugins/Train Carts/arrivaltimes.txt
    2011-11-06 12:14:08 [INFO] [TrainCarts] version 1.46 is enabled!
    Now at the end as you can see it still says enabled. So uhh what? I mean the error seems to be that the files aren't created. But shouldn't they be auto created? I am using the most recent version of both bukkit and train carts.

    EDIT:
    Hmm I may have found the error. It seems your plugin is not compatible with http://dev.bukkit.org/server-mods/bukkitinventorytools/ Although i don't know why. I am not good in java yet. But upon removing the inventoryTools plugin that error goes away? Possible to fix?
     
  23. Offline

    bergerkiller

    @HalestormXV I bet you onlt get that error the first time the plugin starts. Has to do with the file not being found, I'll properly handle that error in the next version. It is compatible, don't worry.

    And yes, save auto-creates them, but my custom Configuration implementation throws and outputs any error it finds while loading. Simply forgot to add one.
     
  24. Offline

    crosstalk

    Is there a way to prevent people (including the owners) from pushing the trains around? I'd rather not be able to push trains right out of the station.
     
  25. Offline

    bergerkiller

    @crosstalk new version will have an extra configuration setting, setting if owners are ignored when pushing. I guess it is time to update. Any other changes you'd like happening?
     
  26. Offline

    crosstalk

    Thanks, and I can't think of any other changes at this point.
     
  27. Offline

    bergerkiller

    @crosstalk re-uploaded 1.48 and it now has an ignoreOwners configuration. Trains with keepChunksLoaded set will now properly load too.
     
  28. Offline

    HalestormXV

    @bergerkiller I thought it would but it didn't. Even after the files are created the Error still exisits. Which is why I found it strange because I tested with the files and without. Without the files they are not autocreated if the bukkitinventory plugin is in. Then I tried with the files in the folder and the error produces itself even when the files exist. Once I remove the bukkitinventory plugin though the error stops. Now if I restart the server without bukkitinventory in and without the files they do autocreated as they should.
     
  29. Offline

    Sneaky420

    @bergerkiller

    I noticed that there was an update, just wondering if the idea of disabling the powered cart on trains, so it is mearly there for looks, is still on the table? Tested it on my one spawner, and the train mostly stays in the station, but wiggles in place, or at another station that has 2 powered carts, it has just enough to escape after a few mins of wiggling and slowly moving forward.

    Other then that, everything is working great, and thank you again for the awesome plugin and all the work. :)


    EDIT: Had another idea, for single carts that are placed, make them so they are not a "train" as an option, i had an existing rail system in place that used single use carts, with a plugin called cartdispence, so it is kinda interfearing :|


    EDIT 2: Seeming to have an issue with the ejector signs... I place the sign facing the direction the train is coming from... then power it, and it will eject me, but it doesnt seem to care about the direction or distance, I get bumped up on block and then fall in to the rest of the train as it pushes me out of the way. More of an annoyance then a real issue, and i am sure I am placing it right, cause i have 2 stations (made before 1.45) that work and follow the correct direction
     
  30. Offline

    bergerkiller

    @Sneaky420 Ejector signs seem to be working perfectly well, did you set the eject offset correctly?
    (third line, x/y/z format)
    Powered minecarts don't interfere either, they don't bump and nicely stop at the station...
    What TC and CB version do you use?

    @HalestormXV I'll look into it and add support for it if possible.
     
  31. Offline

    Aqua77

    When we are talking about ejection at stations: is there a possibility to have an eject condition.
    Something like the player only gets ejected when he is holding a specific item in his hand?
    So the players could have the control in their hands. :)
     

Share This Page