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

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    [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]

    This post has been edited 184 times. It was last edited by bergerkiller Oct 16, 2012.
  2.  
  3. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @SinCalChewy
    So basically, the thing is on. You let a minecart enter it, it leaves again, and it turns properly off. But for some strange reason, the lever is on sometimes?

    Because that would mean it doesn't toggle the lever now and then. It could be that the lever far away that is in an unloaded chunk, doesn't get toggled. And as you enter near that lever, it is still on, from when the chunk was saved.
  4. Offline

    CommanderGizmo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @bergerkiller So, just because I'm curious: Are you saying that the chunk unload is actually cancelled, or simply that the chunk is loaded after it has unloaded?

    Perhaps the crops don't grow because the timers for growth are reset on each loading of the chunk?
  5. Offline

    SinCalChewy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    That is what I'm thinking, because the regions that I never have problems with are closer together, the ones that get stuck on are slightly further, but not super far, apart. Also, if I ride the rail to our second town in the next biome where the lantern/detector is near the station, and then ride it back, it works fine, I would think because it's near the eject and therefore loaded. It seems however, if I ride to the second town in the next biome, and then /home back to the first station, the light/detector is still on, like you said because it was saved like that I would think, and it wasn't turned off when the train came back to town perhaps? Is that something I'm doing wrong, like having them too far apart? Or is that something the plugins doing? Just so I know what I have to do, or wait, for. Lol

    We're on a large biome world, so the rail is pretty long. The regions said they were found and set still when setting the signs down, so I didn't really think twice about it.

    This post has been edited 1 time. It was last edited by SinCalChewy Aug 30, 2012.
  6. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @CommanderGizmo
    There are no timers involved when growing. It is simply a matter of chance upon chance upon chance based on the environment the crops are in. (I can know, I rewrote all of that in Spout Vanilla)

    It could be the chunks don't stay loaded long enough to ever hit that chance. It probably takes three times longer for a crop to grow then.

    @SinCalChewy
    I never tested the detector for extremely long distances, so it could very well be. I'll do some tests today on my 30-chunks long railway. :)
    Do note that redstone won't update into unloaded chunks. You may have to keep the chunks at these circuits loaded somehow. For sure, I will make sure that levers are updated when a chunk loads. It is a simple matter of adding a chunk-based mapping of the detector signs.

    This post has been edited 1 time. It was last edited by bergerkiller Aug 30, 2012.
  7. Offline

    SinCalChewy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Cool, thanks. My first thought was that it was a problem with redstone, but then later found out it was just the levers.
  8. Offline

    Lexion

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @bergerkiller

    Hi, would it be possible to add a feature to list how many TrainCarts are currently on the server.

    Thanks
  9. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @Lexion a train counter or a minecart counter?
  10. Offline

    Lexion

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I am interested in the number of trains that are active (moving or stationary) not too bothered how many carts make up the trains.

    Thanks
  11. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @Lexion
    /train list now shows the amount of trains on the server, and the amount of trains that are moving.

    EDIT

    Ok all done. It is now up on GitHub. Usage:
    For example:
    It supports all sound and regular effects. I don't think I will add stuff like effect lists with timing and all...if you want to play a complete song, find a plugin (note block playing plugin) I can hook into instead. Don't want to end up managing two complete plugins for this.

    http://www.minecraftwiki.net/wiki/Bukkit/TrainCarts/Signs/Effect

    This post has been edited 2 times. It was last edited by bergerkiller Sep 2, 2012.
  12. Offline

    SinCalChewy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Detector levers still don't get updated on chunk loading in 1.71.5. :'(

    But other than that, great release so far! Thanks Berger
    Gonna have to mess around with the effect sign. :)

    This post has been edited 1 time. It was last edited by SinCalChewy Sep 2, 2012.
  13. Offline

    Lexion

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Thanks bergerkiller, it says you are the proud owner of the following carts for anyone using "/train list" even if they have not called any carts, I can ignore that as I just want to see how many trains are on the server.
  14. Offline

    CommanderGizmo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I would really love to see the collect and deposit signs allow you to just pickup or dump to/from the ground. Maybe use 'g' for ground like 'f', 'c', and 'd'. This would open up a whole new set of industrial buildings.
  15. Offline

    AmmarMirza

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Dude you should add a train system so you have to buy your way into the train
  16. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @AmmarMirza
    Actually, there IS a ticket sign, someone requested that once. Though because of it's simplicity not always useful. It basically lets IConomy subtract a set amount from the players' account, and if the player can't pay, he is ejected.
    For example:
    Add gives money, and check simply displays the current bank money value to the user.

    @CommanderGizmo
    Not a bad idea, and not too hard to implement. All I have to do is develop an inventory based on items on the ground.

    This post has been edited 1 time. It was last edited by bergerkiller Sep 4, 2012.
  17. Offline

    CommanderGizmo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @bergerkiller Could you also add a limiter in the train properties for the maximum distance to pick up and deliver using the ground? Actually, it would be great if there was also a master limiter in the main config file. That way it can't be used to steal items.
  18. Offline

    halfcharged

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Hey guys I have a small problem. I'm trying to run a train indefinitely on a loop and when it comes to stations people can hop on and go to the next stop or whatever. For some reason the train tends to just stop when nobody is in it and I have tested the powered rail and it is fine it seems to only happen when it goes out of range of a user as when I run beside the train it is also fine. Sorry if I'm asking a noobish question as I am only new to craftbukkit and this is the first plugin I'v tried. Please get back to me thanks.

    This post has been edited 3 times. It was last edited by halfcharged Sep 5, 2012.
  19. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @CommanderGizmo it would use the same distance settings as used for chests and furnaces, a maximum for that is already configurable. (the default too)

    @halfcharged
    Common issue, set the 'keep chunks loaded' to true on the train:
    While having the train selected. By default it is false, resulting in the train unloading (and stopping) when the chunks the train is in unload.
  20. Offline

    CommanderGizmo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    As of the latest version (1.71.5) the carts are putting full stacks of items into furnaces even when an amount is specified:

    Code:
    [!cart]
    deposit f
    8 pork;coal
    An entire stack of pork is placed instead.
  21. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @CommanderGizmo
    On it, I noticed an odd error when debugging, too, so I'll fix that as well. (could be the two are related)

    At least I know the 'disable TrainCarts on critical error' system is working fine...

    EDIT

    Fixed both the error and your problem. Now working on a 'grab nearby items' system.

    edit: This will also get a deposit system; which adds to nearby items and spawns additional items.

    This post has been edited 2 times. It was last edited by bergerkiller Sep 9, 2012.
  22. Offline

    CommanderGizmo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @bergerkiller

    I have also noted that collect signs do not work on furnaces and it seems to place entire stacks of fuel.
  23. Offline

    SinCalChewy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Have you got a chance to to a look at making detectors update on load? I'm almost certain that the detectors being saved as on/off is the cause now, for if I ride the rail back, they're fine. But if I /home, they're as they were when they were saved when I get too far away.
  24. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
  25. Offline

    Johnny Crazy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @bergerkiller
    Do you know why people fly out of the Train at some places?
    If u exit the Train, you can see them again...
    And the Playes are always the same, i can make a quick Video if u would like to see it

    Thanks ;)
  26. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @Johnny Crazy
    I can't picture exactly what happens, so if you could make a video, please do. Looks like a minecart server<>client synchronization issue to me, but not sure.
  27. Offline

    Johnny Crazy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
  28. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @Johnny Crazy
    That looks...interesting...but is the player gone or is it floating in the air/next to the minecart he is in? (also, didn't he just enter the incoming train by right-clicking it? There could be a delay)
  29. Offline

    Johnny Crazy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @bergerkiller
    At first, no he was not entering the incoming Train, for sure ;)

    I saw that he was sitting on the Track...kinda weird i know, but he did sit on the Track but without a Minecart.
    If you would like to see another video, but its hard to capture
  30. Offline

    SinCalChewy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    This happens for me too. The player is not visually on my screen, as in it looks like I'm the only one in the train. Dynmap still shows them moving with me, and as soon as we are ejected, I can see the other player(s). It's not right away either, I will be able to see the other player(s) riding with me for a random amount of time, like 15 or 20 seconds most times, and then they are gone. I have never seen another player sitting on the track or anything, they just disappear.
  31. Offline

    Johnny Crazy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @SinCalChewy
    Yeah, thats the exact what happens,

    If you go to the Station, where they entered the Train, you can see them sitting on the Track like being in a MineCart...
  32. Offline

    SinCalChewy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Oh snap, now that you said that, I did see that one time when we had a few of my buddies friends playing with us. Youre right...

    Another issue I seem to be having, is at certain sections of rail (Not a certain spot, but like a stretch 10 or so long), I'll take damage riding by it. like 1/2 a heart, but there isn't anything on the sides of the rail or any other reason to be hurt, it just happens. And it's always in certain areas, one of the ones on my server being a start of one of the bridges to the desert area we have. Going over the first 10 or 15 rail sections, you always get hurt 1/2 a heart at some point...

    This post has been edited 1 time. It was last edited by SinCalChewy Sep 11, 2012.

Share This Page