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

    Mycah believe me, it will fail. I've seen the changes, and they will definitely break TrainCarts. Waiting for the official RB for 1.2.2 to update this plugin...
     
    Mycah likes this.
  3. Offline

    Thulinma

    If you need any help, you know how to find me ;-)
    Will be updating my own server to 1.2 pretty soon I think, which means I'll be forced to update traincarts for 1.2 as well (unless you beat me to it, of course).
     
  4. Offline

    PenzRules

    Yeah, nice new features. Thanks. I'll wait before using 1.2.x. See the changelog, there seem to be some crucial bugs.
     
  5. Offline

    Mycah

    Thank you for the heads up, and the continued support. You really are one of the most prolific mod devs. It's really appreciated. This mod is fucking amazing.
     
  6. Offline

    TheChinski

    I'd just like to confirm - It definitely does NOT work on 1.2 :rolleyes:

    Show Spoiler
    HTML:
    16:08:51 [SEVERE] java.lang.NoSuchMethodError: com.bergerkiller.bukkit.tc.NativeMinecartMember.aJ()Z
    16:08:51 [SEVERE]    at com.bergerkiller.bukkit.tc.NativeMinecartMember.move(NativeMinecartMember.java:922)
    16:08:51 [SEVERE]    at net.minecraft.server.EntityMinecart.G_(EntityMinecart.java:421)
    16:08:51 [SEVERE]    at net.minecraft.server.World.entityJoinedWorld(World.java:1260)
    16:08:51 [SEVERE]    at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:106)
    16:08:51 [SEVERE]    at net.minecraft.server.World.playerJoinedWorld(World.java:1242)
    16:08:51 [SEVERE]    at net.minecraft.server.World.tickEntities(World.java:1149)
    16:08:51 [SEVERE]    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:540)
    16:08:51 [SEVERE]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:447)
    16:08:51 [SEVERE]    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    16:08:51 [SEVERE] Unexpected exception
    java.lang.NoSuchMethodError: com.bergerkiller.bukkit.tc.NativeMinecartMember.aJ()Z
        at com.bergerkiller.bukkit.tc.NativeMinecartMember.move(NativeMinecartMember.java:922)
        at net.minecraft.server.EntityMinecart.G_(EntityMinecart.java:421)
        at net.minecraft.server.World.entityJoinedWorld(World.java:1260)
        at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:106)
        at net.minecraft.server.World.playerJoinedWorld(World.java:1242)
        at net.minecraft.server.World.tickEntities(World.java:1149)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:540)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:447)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)[/SPOILER]
     
  7. Offline

    Robulus

    Hi there,

    First let me thank you for the great work.
    I'm doing some testing with this plugin at the moment and i really love it.

    But... :)
    I don't know if i misunderstood something,...but,..when i reboot the server all the trains stop where they are,...so,...they are standing in the middle of nowhere,...
    Is it meant to be like that? And what can is do to "work around" this?
    Is there any possibility to remove the trains when server stop?
    Or how is this planned to be used?

    I planned to let some trains go around in circles all the time, but this won't be possible with this problem.
    So i will have to spawn trains on every station. Any idea what i can do now?

    Thanks for your help and greeting!
    Rob
     
  8. Offline

    bergerkiller

    Robulus I recommend building some sort of switching station, or main station, where all your main trains will end up at some point. Then, 5 minutes before stopping the server, you toggle a lever somewhere to make these trains wait at a predestined location. Using a central launch button you can start them again.

    I do store the train velocity and location when the server closes, and it is able to restore them, but when trains are above stations it may cause some strange behaviour.
     
  9. Offline

    Robulus

    Ok,...wow,...thanks for your quick answer.
    I am just testing a little and i think i'm going to work with [cart] destruct and [train] spawn.

    So,...every train comes to it's end @ the last station and every station has it's own spawn button.
    Not the way i thought it would be possible but,...still nice,...

    Thanks!
    Greetings
    Rob
     
  10. Offline

    bergerkiller

    Uploaded beta 34 compatible with CraftBukkit build 2032 (MC 1.2.3)
    It works, but not everything has been tested. May you notice anything, report.
     
  11. Offline

    Liger_XT5

    Just installed traincarts as many people on my server really want Minecart mania back, but obviously couldn't.
    The destroy feature is quite important for our subway as sometimes some carts get empty down the rails. But currently, still looking at wiki, unsure of how to detect empty carts to remove them to stop collisions.
     
  12. Offline

    bergerkiller

    @Ligrt_XT5 detector sign, third line 'empty', attach a lever to the block the sign is attached to, place destroy sign below this lever, attach to the same column of blocks. See the 'blocks empty minecarts' example on the WIKI.
     
  13. Offline

    _frozen

    Sorry to be the bearer of bad news, but:

    1.2.3 detectors not working. Not flipping levers or anything. You're more than welcome to come check it out on my server.
     
  14. Offline

    bergerkiller

    _frozen confirmed, looking at it now.
     
  15. Offline

    andrewpo

    Could the config.yml file get an option to select the old (XYZ offset) or new (left/up/down) eject signs please?
    I find the new mechanics more of a pain to work with. :/
     
  16. Offline

    Celtic Minstrel

    I can't imagine any way in which left/right/up/down could be harder to work with than xyz offset. The latter requires you to know which axis is the x axis and which axis is the z axis and do some minor calculations to figure out which way you want it to go; the former is a relative direction with respect to the way the sign is facing, so all you'd need to remember is to swap left and right. (I may be wrong about that last.)
     
  17. Offline

    bergerkiller

    Celtic Minstrel yup that is why I made it relative to the sign. Now you can simply set it to '0/0/5' to exit passengers five blocks forwards, and '0/1/-2' to make them exit 1 block higher 2 blocks behind you. It is easier, because you no longer have to keep the xyz-axis in mind.
     
  18. Offline

    _frozen

    Another suspected bug: Chunk persistance isnt working.
    (more information)
    train property is set by default property signs.

    lightrail:
    allowLinking: true
    requirePoweredMinecart: false
    trainCollision: true
    keepChunksLoaded: true
    speedLimit: 0.5
    slowDown: false
    pushAway:
    mobs: true
    players: true
    misc: true
    ignoreStations: false
    owners: RMetro
    tags: []
    allowPlayerEnter: true
    allowPlayerExit: true
    allowMobsEnter: false
    isPublic: true
    pickUp: false
    blockBreakTypes: []

    EDIT: Used Signs to set KeepChunkLoaded-- still doesnt work.

    So far, all avenue of using chunkloaded isnt working -- including KeepChunkLoadedWhileMoving:true in the config.

    ----------------------------------------------------------------------------
    Just a quick question regarding destinations.

    Is it possible to have two different locations with the same destination? For example: I have a two-track rail line; at the end of the line instead of merging into one track, I want a switcher to do a 1:1 switch so the train alternates between the two platforms. But in order to do this, I have to set up two destination signs, both identical just in a different location 1 tile apart.

    The easy solution for this in my case would be to make destination signs serve two lines if it notices it next-door, for example: TST (t = track, s = sign).. but thats asking too much.

    If this isnt doable, what other workarounds would you offer?
     
  19. Offline

    andrewpo

    I'll try to recompile it with the old ejector code; I don't overly love the idea of having to go to every single train station on the server and fix the eject signs :p

    Thanks for your continued development of this brilliant plugin! :D
     
  20. Offline

    waflija

    Is there a feature to pick up items from the ground into StorageCarts and / or alter the Boosterrail-power like MM did? Because MM is not longer supported I have to move completly to traincart...
     
  21. Offline

    andrewpo

    For the speed...
    Code:
    [!train]
    property
    speedLimit
    0.6
    0.4 is the default, I used 0.6 in my example.

    0.4 means the cart will go at 8 blocks per second (0.4 * 20)
    0.6 means the cart will go at 12 blocks per second (0.6 * 20)

    For the items... isn't that in the config.yml?
     
  22. Offline

    _Alf

    I would like to suggest a special destination-changer-sign, where you can specify a trainname in 3rd line and a new destination in 4th line, which take effect after a stop at a station (like it already is).:rolleyes:[diamond]
     
  23. Offline

    waflija

    not realy. - this is the config for the max. Speed, not the booster ?!?
     
  24. Offline

    _frozen

    If you put a destination sign like

    [train]
    destination
    AhappyPlace
    EvenHappierPlace

    It will change the destination from Ahappyplace to EvenHappierPlace once the train reaches the destination. If the train is not programmed for that destination, it will pass the destination sign without changing its destination,.
     
  25. Offline

    _Alf

    But i want to change to different destinations dependent on trainname.


    Edit: ...wait.. i'll think about your last sentence!
     
  26. Offline

    Junrall

    Are the "switchers" broken for trains?
    Here is the scenario:
    I have four minecarts, one of which is occupied by a player.
    I have a "switcher" sign below a junction point that reads:
    Code:
    [!train]
    switcher
    passenger
    No matter which direction the sign is facing, the track above never switches directions.

    Using [!cart] seems to work, but it breaks the occupied cart away from the others... and sends it in the same dirction no matter which way the sign is facing.

    My goal is to send an entirely empty train down one track, but if there is at least one occupied cart, then the entire train should remain on the main track. Any ideas?
     
  27. Offline

    andrewpo

    With that property on a train, it is the max. speed that a booster will get the train to before it goes at a steady speed.

    You can also set this in the default properties YML file (By default, it is 0.4 - 8 blocks per second)

    Code:
    [!train]
    switcher
    passenger
    !passenger
    ?

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

    Junrall

    Dhoo! I think you're right!
    I'll try that when have a chance... thanks!
     
  29. Offline

    _frozen

    bergerkiller:

    another bug, this time trying to use /train destroyall w/ 1.2.3, TCb33, and the latest bukkit dev :

    2012-03-13 19:45:51 [SEVERE] Unhandled exception executing command 'train' in plugin Train Carts v1.6
    2012-03-13 19:45:51 [SEVERE] java.lang.NullPointerException
    2012-03-13 19:45:51 [SEVERE] at com.bergerkiller.bukkit.tc.signactions.SignActionBlock.isHeadingTo(SignActionBlock.java:13)
    2012-03-13 19:45:51 [SEVERE] at com.bergerkiller.bukkit.tc.signactions.SignActionBlock.execute(SignActionBlock.java:39)
    2012-03-13 19:45:51 [SEVERE] at com.bergerkiller.bukkit.tc.signactions.SignAction.executeAll(SignAction.java:97)
    2012-03-13 19:45:51 [SEVERE] at com.bergerkiller.bukkit.tc.signactions.SignAction.executeAll(SignAction.java:88)
    2012-03-13 19:45:51 [SEVERE] at com.bergerkiller.bukkit.tc.MinecartGroup.clearActiveSigns(MinecartGroup.java:372)
    2012-03-13 19:45:51 [SEVERE] at com.bergerkiller.bukkit.tc.MinecartGroup.clear(MinecartGroup.java:549)
    2012-03-13 19:45:51 [SEVERE] at com.bergerkiller.bukkit.tc.MinecartGroup.remove(MinecartGroup.java:564)
    2012-03-13 19:45:51 [SEVERE] at com.bergerkiller.bukkit.tc.MinecartGroup.destroy(MinecartGroup.java:573)
    2012-03-13 19:45:51 [SEVERE] at com.bergerkiller.bukkit.tc.storage.WorldGroupManager.destroyAll(WorldGroupManager.java:271)
    2012-03-13 19:45:51 [SEVERE] at com.bergerkiller.bukkit.tc.commands.GlobalCommands.execute(GlobalCommands.java:46)
    2012-03-13 19:45:51 [SEVERE] at com.bergerkiller.bukkit.tc.commands.Commands.execute(Commands.java:28)
    2012-03-13 19:45:51 [SEVERE] at com.bergerkiller.bukkit.tc.TrainCarts.command(TrainCarts.java:397)
    2012-03-13 19:45:51 [SEVERE] at com.bergerkiller.bukkit.common.PluginBase.onCommand(PluginBase.java:258)
    2012-03-13 19:45:51 [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
    2012-03-13 19:45:51 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
    2012-03-13 19:45:51 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:461)
    2012-03-13 19:45:51 [SEVERE] at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:818)
    2012-03-13 19:45:51 [SEVERE] at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:778)
    2012-03-13 19:45:51 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:761)
    2012-03-13 19:45:51 [SEVERE] at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33)
    2012-03-13 19:45:51 [SEVERE] at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    2012-03-13 19:45:51 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:112)
    2012-03-13 19:45:51 [SEVERE] at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    2012-03-13 19:45:51 [SEVERE] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
    2012-03-13 19:45:51 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
    2012-03-13 19:45:51 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)

    Hope the finals are going smoothly for you, good sir.
     
  30. Offline

    Junrall

    Well, it didn't work... bummer.
    Is this working for anyone else?
     
  31. Offline

    _frozen

    ehhhhh. I think the whole beta is borked on 1.2.3 -- waiting for further notice from Bergerkiller-- I have several bugs to report.
     

Share This Page