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

    kinkinhood Let's reupload once again then... xd
    Note: I did have this issue before, but I'm not sure if it's fixed now.
    This version also adds 'item animations' when transferring items.
     
  3. Offline

    biblelucas

    I just get a bunch of errors like dreamskiller what do i have to do?
     
  4. Offline

    bergerkiller

    biblelucas
     
  5. Offline

    htxkronick

    @bergekiller I honestly dont know what to do with the src folder
     
  6. Offline

    NopeDK

    So I just checked my configuration files and all the trains that I placed for my test described was with keepChunksLoaded: true. I am using it in conjunction with NoLagg, perhaps something special needs to be done?
    NoLagg conf
    TrainCarts default
    TrainCarts conf

    All the trains was on time for at least 5 minutes when I was online and timing the arrivals to see if they matched, they did. It is when no one is online it "breaks".
     
  7. Offline

    AppLeNaToR

    I talked with somebody from the mcportcentral now.

    She suggested to replace the EntityMinecart.class and MinecartTrackLogic.class with the regular Bukkit ones- which i did.

    So far i am able to enter the minecarts again, when TrainCarts is active.

    But somehow the carts still ignore Destinations signs when passing them. Could this still be caused by the modloadermp?

    And if, how could i possibly fix it :)

    Thank you alot for your time.
     
  8. Offline

    bergerkiller

    AppLeNaToR destinations signs don't actually stop the train; that is a task for the station. All the destination sign does is mark an end-point with a name and set a destination on the train. Are you saying that it doesn't set the destination on the train?

    Also note that the sign requires redstone power to set a destination on the train. You can use the !-system to invert the redstone:

    NopeDK Ok I'll do some more tests on the keep chunks loaded feature; might have to adjust it a bit to keep more chunks loaded

    htxkronick Open the downloaded zip file and copy all contents into the plugins folder. You probably opened the jar file (which is the actual plugin) instead.
    - Place the 'folder' containing the src folder into the plugins folder.
     
  9. Offline

    AppLeNaToR

    Holy that was a quick reply :)

    Yes, iam saying it does not set the destination on the Train.

    Well at least it won't show the Destination anymore when i use the "/Train info" command.

    in MC 1.0 with Traincart 1.54 the train passed the destination sign. When i used the "/Train info" command, i saw the "destination" listed. ("HBF" in this case)

    Since the update the train station was not changed at all. But with the latest version it looks like it is not receiving the destination. (it actually "bounces back" on the first track switcher).

    When it passed the sign (which is powered) and iam using the "/train info" command, the information won't show any destination set up.


    To set the destination i got this sign:

    [train]
    property
    destination
    HBF


    And the destination sign:

    [train]
    destination
    HBF



    //Edit

    Does the destination sign itself require redstone current? (did not need it before at least)
     
  10. Offline

    Gadarol

    Power the signs, and do a reroute. Make sure the destination sign faces the direction the train is coming from.
    I had this bouncing issue on a test track, only to find that it bounced because the route was shorter the other way around ;)
     
  11. Offline

    AppLeNaToR

    As far as i know, the destination signs work in both directions if they are "sideways" alligned to the tracks.

    Il check the "shorter route-bouncing" later.


    What iam wondering the most is, that the "/train info" does not show any set destination. in the 1.54 traincarts it showed it as soon as it was set.


    If anybody wants to take a look at the train station on our server (for further debugging), send me a message. Il send you the details then. (You are also welcome to stay on the server and build your Home there ;) Its running MC 1.1 + RedPower Mod PR4D
     
  12. Offline

    bergerkiller

    AppLeNaToR Each individual cart has it's own destination, so it shows up under /cart info :)
    Yes, even if two trains with different destinations collide, they will properly split up when this is needed.
     
  13. Offline

    AppLeNaToR

    AAAAAaaah :D alright. Il check the /cart info then. Sorry. did not know about that.


    Is the
    [train]
    property
    default
    ProfileName

    sign still working? If yes, does it set the default for each cart or for the train?

    I once thought it worked (the speed got changed) but the "minecart entry" message did not appear.

    Could i somehow send you my defaultconfig file so you can check if i made a mistake?
     
  14. Offline

    bergerkiller

    AppLeNaToR I am still fixing quite a lot of issues in the latest beta, mostly redstone related.
    Before I end up looking for something that is possibly related to the redstone states, I need to fix the redstone states first. :)
    (the state inversion was a problem, which is now fixed. Next up: handling redstone changes occuring)
     
  15. Offline

    biblelucas

    i did and it wasnt really helpful
     
  16. Offline

    bergerkiller

    biblelucas Ok so you get this error, like Dreamskiller:
    Code:
    java.lang.NoSuchFieldError: bN
    at com.bergerkiller.bukkit.tc.NativeMinecartMember.move(NativeMinecartMember.java:690)
    at net.minecraft.server.EntityMinecart.y_(EntityMinecart.java:396)
    at net.minecraft.server.World.entityJoinedWorld(World.java:1256)
    at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:110)
    at net.minecraft.server.World.playerJoinedWorld(World.java:1238)
    at net.minecraft.server.World.tickEntities(World.java:1145)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    Let's start simple:
    - What CraftBukkit build do you run right now?
    - What version of TrainCarts do you use right now?
    - Do you use Spout?
    - Do you use a plugin related to client mods, such as MinecraftForge?
    - Do you use a modified server? (did you change some class files)

    EDIT

    I'm going to sleep, here you can see my progress on the new WIKI page with the updated features. :)
    http://www.minecraftwiki.net/wiki/Bukkit/TrainCarts/Signs
     
  17. Offline

    Nick2253

    You mentioned in the first post "As for 1.21, it is also possible to safely exit your train by setting an exit offset with a (sideways) push factor for the train." I can't figure out how to do this. I didn't read through all 59 pages, so if you posted this, I'm sorry. I was reading through the wiki, and I noticed the push-away property, but it said this doesn't apply to owners, so I'm assuming it's not the same thing.
     
  18. Offline

    kinkinhood

    bergerkiller
    So is the switcher the new tag sign? If so, will the tag signs be left in for legacy sake(i.e. make it so people don't have to go looking for their tags to change)
     
  19. Offline

    bergerkiller

    Nick2253 you can set an exit offset in the configuration; this is relative to the cart:
    leftright/updown/forwardbackwards
    x/y/z

    kinkinhood Yes, switcher signs are the replacement for 'tag' signs. I still support the tag format for those that used it, or like 'tag' better :)
     
  20. Offline

    kinkinhood

  21. Offline

    bergerkiller

    I'll be looking at the 'keep chunks loaded' and 'slowdown' features to look for possible failures. If you have anything else to report, feel free to post. (even if it is a feature request)
     
  22. Offline

    harryjamesuk

    Brilliant! Amazing! Love it, brilliant add-on.
     
  23. Offline

    Nick2253

    I have a feature request (or a howto if it already exists, lol):

    One of my favorite features of Minecart Mania was the announce signs. That way, people on my train would know what station was coming up. Is there a way that can be added to TrainCarts?
     
  24. Offline

    bergerkiller

    Nick2253 Mhh yeah messages were a thing I wanted to add, but not sure how. Surely I will use the trigger sign to mark the train to announce for...it can already display the train name/destination name/arrival time on signs.

    How exactly do you want it done? Add a simple 'announce' sign (announcer) with the key on the sign?
    stationmsg1 being a variable + text declared in SignLink?
     
  25. Offline

    kinkinhood

    Out of curiousity would there be any way to set up carts to continue forward momentum when they fly through the air? I know currently the minute they derail they kinda just start falling.
     
  26. Offline

    1337phreak

    Testing Beta22 on CraftBukkit 1.1-R4 with modloadermp & forge I can now get into a minecart but they're still having problems with collision. When I place 2 trains and set them with link false and collide false they just end up pushing each other and eventually will merge and eventually just stop moving.

    Nick2253 I use worldguard to mark a region on player entry to display what station is coming up

    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

    1337phreak well spotted about the collision thing, it wasn't properly ignoring trains in the collide event any more.
     
  28. Offline

    _frozen

    That would be useful, and also an way to announce in the console using an announce sign as well? Basically, when the train runs over the sign, it spams the console the following:
    [train]
    announce
    (announcement here)
    (optional second line)

    or you can utilize the signlink

    [train]
    announce
    %variable%
    (optional second variable)

    Another request: For us with an closed loop systems, a way to automate train launchers based on variables passed on from triggers and/or detector signs,

    Possible Example A: When at point A, if a train does not pass by within 120 seconds (trigger), and there is no previous train in the last 100 tiles(detector), it sends out an signal (variable based? trigger based?) to launch the spawner. This way, the system will always have a train running around.

    Possible Example B, possibly too complicated: Using a new sign (Timed) the system tracks the whole line using detectors and triggers; and at every interval (5 minutes) if it notices that the carts are not in sync (by damage, crash, etc) the system advances all trains to the next (timed) sign, stops the trains, and spawn new trains in those (timed) sign locations that has no train arriving in the next 1 minute. Then when all (timed) signs are occupied by trains, it launches all trains. Timed signs should behave like a station when it comes to stops, and there should be an announcement in the console, locking players etc in the carts (optional).

    Now that I think about it, it might be too big of a feature request. Dont let this stop the next release, hold it until later but the idea should come useful for metro systems.

    EDIT: HUGE props for the new wiki. ITs improved! its great! it blows my pants off!

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

    bergerkiller

    _frozen thanks, but it's still far from finished hehe :)

    I guess I know what to call it. The announce sign will be similar to the trigger sign, but will utilize SignLink.
    This way you can show announcements on signs. For example:
    Then on %townhall% it will show the %stationmessage1%. I still need to add some variables inside variables thing for SignLink, but it seems impossible to do. Then you could, for example, combine the %time% variable inside another variable. I only have no idea how to make the variables update...ow well

    And I guess I could add a triggername and !triggername for switcher signs. It then reads if the counter of triggername is active or not, and can toggle a lever based on that. (but it won't un-toggle by itself, that requires too much processing power)

    Locking players can be done using the property signs (playerexit on third line, false on fourth line)

    Finally, I noticed there were some issues with the restore part of the trains. For example, if a train travels into unloaded chunks and is restored, some carts are not restored at all; or not found; and end up glitched: they are stored in the chunk, but not in the world entity list. This causes really weird behaviour and requires a reload to fix.
     
  30. Offline

    _frozen

    So no way to announce it in the console? Would be nice to see somewhere "You are now entering Union Station" for my example instead of a sign.

    Cant it act like an button? One signal and thats it? Just a thought, if I m not right, then Im not right.
     
  31. Offline

    bergerkiller

    _frozen if you mean by console the in-game chat, then sure, the announcer will obviously announce :)
    I can add a token after 'announce' to set if it is broadcasted or not. (announce sl - announce signlink only)

    Yup, it acts as a button. When a train enters the switcher sign, it instantly toggles a lever if either of the two conditions are met.
     

Share This Page