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

    ledhead900

    I would not have done that it someone else would have done that abusing the cart spawn permission your probably gave out. I have been using this plugin for about 5 + versions with no such lag issue or train abuse.
     
  3. Offline

    bergerkiller

    Even then, there's a /train destroyall command to get rid of them.
     
  4. Offline

    Gadarol

    Quick Question: Can i prevent people from stopping the train by just klicking a cart? Is that intended?
    Thanks for the great plugin!
     
  5. Offline

    bergerkiller

    @Gadarol clicking it is part of the operation:
    Everyone that places a minecart becomes an owner by default. You can disable this (setOwnerOnPlacement: false) to make everyone owner at all times.

    Only owners can move/stop the train. Global owners (OP) can move/stop any train.
     
  6. Offline

    Gadarol

    Just tested this. Player gets "you dont own this train" when trying to claim "my" train, train still stops when he's clicking a cart. Tested both "setOwenerOnPlacement: false and true). Am I missing something else?
     
  7. Offline

    dockter

    I'm developer testing for Spout, which could be the cause.

    Current configuration is CB1529, Spout: 556. Client 1.00, SC 806
     
  8. Offline

    bergerkiller

    I'll look at all this tomorrow...time to sleep :)
    Not sure about the owner issues, could have to do with the new double-sided configuration introduced for stations..
     
  9. Offline

    dockter

    Is it possible to allow a unmanned cart load chunks?

    Problem: I have a very long train track, 2000m long. The train doesn't make it to its destination because it appears to stop on chunks that are not loaded, even stops on powered rails, dead stop.
     
  10. Offline

    bergerkiller

    @dockter yup, set 'keepChunksLoaded' to true to keep nearby chunks loaded. (rgardless if they are occupied or not)
     
  11. Offline

    dog.big

    Not working with 1.0

    2011-11-29 16:07:57 [WARNING] Task of 'Train Carts' generated an exception java.lang.IllegalAccessError: tried to access field net.minecraft.server.EntityMinecart.derailedX from class com.bergerkiller.bukkit.tc.Utils.EntityUtil at com.bergerkiller.bukkit.tc.Utils.EntityUtil.replaceMinecarts(EntityUtil.java:91) at com.bergerkiller.bukkit.tc.MinecartMember.undoReplacement(MinecartMember.java:204) at com.bergerkiller.bukkit.tc.MinecartGroup.unload(MinecartGroup.java:70) at com.bergerkiller.bukkit.tc.GroupManager.hideGroup(GroupManager.java:318) at com.bergerkiller.bukkit.tc.MinecartGroup.updateGroups(MinecartGroup.java:58) at com.bergerkiller.bukkit.tc.TrainCarts$2.run(TrainCarts.java:152) at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:482) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414) at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
     
  12. Offline

    bergerkiller

    @dog.big did you use the MC 1.0 version of TrainCarts?
     
  13. Offline

    dog.big

    yop...
    also pushaway cant push players away.. dammit :(
    default flags:
    Code:
    default:
      pushAway:
        mobs: true
        players: true
        misc: true
    admin:
      pushAway:
        mobs: true
        players: true
        misc: true
    station:
      pushAway:
        mobs: true
        players: true
        misc: true
    
    Now, it crashing our server:
    2011-11-29 16:34:01 [SEVERE] Unexpected exception java.lang.IllegalAccessError: tried to access field net.minecraft.server.EntityMinecart.derailedX from class com.bergerkiller.bukkit.tc.NativeMinecartMember at com.bergerkiller.bukkit.tc.NativeMinecartMember.preUpdate(NativeMinecartMember.java:394) at com.bergerkiller.bukkit.tc.MinecartGroup.doPhysics(MinecartGroup.java:745) at com.bergerkiller.bukkit.tc.MinecartGroup.doPhysics(MinecartGroup.java:697) at com.bergerkiller.bukkit.tc.MinecartMember.w_(MinecartMember.java:61) at net.minecraft.server.World.entityJoinedWorld(World.java:1251) at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:104) at net.minecraft.server.World.playerJoinedWorld(World.java:1233) at net.minecraft.server.World.tickEntities(World.java:1140) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:507) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414) at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)

    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

    @dog.big Train owners are ignored when pushing away: you can disable this in the main configuration.

    I'll do some checkups against 1.00 and see what issues there are, since Thulinma is off atm.
     
  15. Hmm..... No clue where that is coming from. Not anything I made changes in, as far as I can see. Will look into it later.
     
  16. Offline

    bergerkiller

    @Thulinma ok thanks, I'll look into the 1337 build for now. (I did notice some strange disconnections for no reason)
     
  17. Offline

    dog.big

    Please help asap. Because we cant use this great plugin as our majority subway system anymore. Players aren't pushed away and plugin cause server fails.

    PS: is there any possibilite to add auto-removing of "dead trains" which got removeng by something like /removeminecarts. Also the option for auto-remove of all trais after server starts could be very suseful :].
     
  18. Offline

    bergerkiller

    @dog.big just use /train destroyall to insta-destroy all minecarts.
    /train removeall only removes train information but leaves the separate carts behind. Sorta like a property reset.
     
  19. Offline

    dockter

    MaxSpeed isn't working in 1.0.0, also the [train], tag command sign isn't working as intended in 1.0.0 works maybe 50% of the time, I must have watched that video tutorial 10 times so Im pretty sure I have the setup of it correct.
     
  20. Offline

    xcanner

    Got a really strange problem on CB 1337 and traincarts 1.49.4

    I got a minetrack with following destinations A, B and C.

    You can go from A to B and C. From B to C and C to B. But you cant go from B or C to A?
     
  21. Offline

    bergerkiller

    @xcanner mhh must be a directional issue then. I'll add it to my to check list for today...
     
  22. Offline

    xcanner

    @bergerkiller it's only a problem in 1 out of 4 large metro systems.
     
  23. Are you sure? Both features work just fine on my 1.0.0 server. Is there anything particular about your setup (other minecart-related plugins, for example)? What exactly are you trying?

    If possible, can you upload a copy of the problematic world somewhere so I can run some tests and see what causes this? I'm very interested in worlds where the destination system does not "work" as it should be. If possible, remove all chunks except (near) the parts with rail in it, to save space in the file.
     
  24. Offline

    xcanner

  25. Offline

    dockter

    Latest versions of CB breaks TrainCarts.

    Error:

    2011-11-30 22:15:40 [SEVERE] Could not pass event VEHICLE_COLLISION_ENTITY to Train Carts
    java.lang.IllegalAccessError: tried to access field net.minecraft.server.EntityMinecart.derailedX from class com.bergerkiller.bukkit.tc.Utils.EntityUtil
    at com.bergerkiller.bukkit.tc.Utils.EntityUtil.replaceMinecarts(EntityUtil.java:91)
    at com.bergerkiller.bukkit.tc.MinecartMember.convert(MinecartMember.java:159)
    at com.bergerkiller.bukkit.tc.Listeners.TCVehicleListener.onVehicleEntityCollision(TCVehicleListener.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader$86.execute(JavaPluginLoader.java:862)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
    at net.minecraft.server.EntityMinecart.collide(EntityMinecart.java:721)
    at net.minecraft.server.EntityMinecart.w_(EntityMinecart.java:577)
    at net.minecraft.server.World.entityJoinedWorld(World.java:1251)
    at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:104)
    at net.minecraft.server.World.playerJoinedWorld(World.java:1233)
    at net.minecraft.server.World.tickEntities(World.java:1140)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:507)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    2011-11-30 22:15:59 [INFO] GroupManager - INFO - Data files refreshed.
    2011-11-30 22:16:19 [SEVERE] Could not pass event VEHICLE_COLLISION_ENTITY to Train Carts
    java.lang.IllegalAccessError: tried to access field net.minecraft.server.EntityMinecart.derailedX from class com.bergerkiller.bukkit.tc.Utils.EntityUtil
    at com.bergerkiller.bukkit.tc.Utils.EntityUtil.replaceMinecarts(EntityUtil.java:91)
    at com.bergerkiller.bukkit.tc.MinecartMember.convert(MinecartMember.java:159)
    at com.bergerkiller.bukkit.tc.Listeners.TCVehicleListener.onVehicleEntityCollision(TCVehicleListener.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader$86.execute(JavaPluginLoader.java:862)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
    at net.minecraft.server.EntityMinecart.collide(EntityMinecart.java:721)
    at net.minecraft.server.EntityLiving.d(EntityLiving.java:921)
    at net.minecraft.server.EntityAnimal.d(SourceFile:43)
    at net.minecraft.server.EntityChicken.d(EntityChicken.java:30)
    at net.minecraft.server.EntityLiving.w_(EntityLiving.java:295)
    at net.minecraft.server.World.entityJoinedWorld(World.java:1251)
    at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:104)
    at net.minecraft.server.World.playerJoinedWorld(World.java:1233)
    at net.minecraft.server.World.tickEntities(World.java:1140)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:507)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)

    If you PM me your username, I can admin you on my server and you can see it for yourself.

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

    MechanID

    same problem
     
  27. Offline

    ledhead900

    What latest version?, tech a development build is not a new version its development build and should not be treated as a release so when talking about versions you should be starting your post like the following below.

    "@bergerkiller
    Hey I have this "issue" would you mind giving it a look over when you get time.
    <CodePaste>

    CB:"craftbukkitversion"
    Traincarts:"TrainCarts Version"


    Actually all of your error reports should look like that regardless of development version or Reco version. I don't see how we can do anything about the errors you post if the version you speak of is changed a day later and its no longer the "latest" what if the "latest" that is out when we try to replicate such an issue has some sort of fix on bukkits end and makes it work again ?.

    Anyway I just wanted to put my comments in about that as its really annoying when people do not post the version numbers its been covered in so many threads to post version numbers or don't expect help.
     
  28. Offline

    bergerkiller

    Meh I got used to asking the same questions, got them in a text file on my desktop xd
     
  29. Offline

    ledhead900

    My server is going alright for 1.0 and for dev builds of almost everything important, tho the sign bug is halting me actually using it, and traincarts is just not working like others have said since a recent CB update.

    I don't understand the sign bug at all really, some signs are fine while others are and its all in the same chunk.
    I did run into a error tho when I was using a CB build I think to low for spout and that gave me a NPE about nolagg and signs maybe its an error that you could make sense off that may help you find a fix for it.

    I run into this when I posted a thread I soon removed before u could see it after I realized i was running traincarts 1.0 and non 1.0 traincarts at the same time.

    I mean once those get fixed up I could use the server and keep and eye on it but it should be alright for public testing of 1.0, since the move from 1.8 to 1.0 is pretty a big task.
     
  30. Fixed in de latest update of the 1.0.0 version that I just uploaded. Same link, still (can be found in the top post by bergerkiller).

    The 1.0.0 version now works with all the latest CB dev builds (does NOT work on older dev builds - if it doesn't work, update!).
     
  31. Offline

    dockter

    Download link says 404, file not found for 1.49.1

    /train maxspeed 0.01 has no affect, this should make the train crawl, just keeps running full speed.

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

Share This Page