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

    SinCalChewy

    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.
     
  3. Offline

    bergerkiller

  4. 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 ;)

    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...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Sep 9, 2018
  5. Offline

    bergerkiller

    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.
     
  6. bergerkiller
    Here is a Video, ignore the Sound
    Show Spoiler
     
  7. Offline

    bergerkiller

    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)
     
  8. 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
     
  9. Offline

    SinCalChewy

    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.
     
  10. Offline

    SinCalChewy

    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...
     
  11. Offline

    AngyPHPNerd

    Hello,
    would it be possible to give a DetectorSign-Pair a name? For example:
    Code:
    [train]
    detector 1001
    
    Our problem is, that creating a new detector region always ends up in breaking the rails before and after the region to ensure that the detector recognize each other correctly...
    Sometimes creating a new detector pair breaks already working ones.
     
    SinCalChewy likes this.
  12. Offline

    CommanderGizmo

    @AngryPHPNerd You can break a track piece before and after the detector region you are adding to prevent this from occurring. Just put the track back after you have placed the detector signs.
     
  13. Offline

    AngyPHPNerd

    @CommanderGizmo I know, I have already referenced this way in my last post ;).
    I think if a detector pair has a name, it would be mutch easier to find two signs which belongs to each other.
     
  14. Offline

    CommanderGizmo

    AngyPHPNerd That is a good idea. I've often wanted it too.
     
  15. Offline

    SinCalChewy

    That would be pretty helpful. It's possible now by taking a piece of track off, yeah. But with a named pair, it would be 300x times easier. Wouldn't have to run all the way back and put the track back and all that junk. :)
     
  16. Offline

    bergerkiller

    1.) I like your idea of the detector names AngyPHPNerd
    It is possible, too, as no real information is needed on the detector sign yet. (it only has a max distance property right now that no one seems to use)

    2.) Strange as it may sound, in the past I messed around with faking a player entering a minecart. I, too, managed to have a player to be seen in a sitting animation outside the minecart. Doing this is fairly complicated, but let's just say you have to take away the minecart without invalidating the passenger<>vehicle relationship on the client.

    What seems to be happening here, is that the client loses track of a certain passenger in the train. I think it can happen when the passenger is in an unloaded chunk, but the video proves that this is not true. It happens over time, automatically, so I suspect a message must be sent at some point. It COULD be that the minecart is being swapped with the player in it, resulting in a passenger in a dead vehicle. This is what caused the glitch to occur in my findings.

    So for whatever reason, the minecart is removed and then respawned again instantly, without properly ejecting and re-entering the passenger. This logic IS part of the replace logic of minecarts, so I find it odd that this happens.
     
  17. Offline

    vacnoa

    My server is 1.3.1 R2, I have My World 1.48 and Train Carts 1.71.5.
    I use trains with portals, but now do not work with the new version.

    and now I have this error when the server starts:

    2012-09-15 11:01:44 [INFO] [Train Carts] Enabling Train Carts v1.71.5
    2012-09-15 11:01:44 [SEVERE] [Configuration] An error occured while loading file 'plugins/Train Carts/trains.groupdata':
    2012-09-15 11:01:44 [SEVERE] java.lang.NoClassDefFoundError: org/bukkit/craftbukkit/util/LongObjectHashMap
    2012-09-15 11:01:44 [SEVERE] at com.bergerkiller.bukkit.tc.storage.OfflineGroupMap.<init>(OfflineGroupMap.java:15)
    2012-09-15 11:01:44 [SEVERE] at com.bergerkiller.bukkit.tc.storage.OfflineGroupManager.<init>(OfflineGroupManager.java:108)
    2012-09-15 11:01:44 [SEVERE] at com.bergerkiller.bukkit.tc.storage.OfflineGroupManager.get(OfflineGroupManager.java:43)
    2012-09-15 11:01:44 [SEVERE] at com.bergerkiller.bukkit.tc.storage.OfflineGroupManager$2.read(OfflineGroupManager.java:301)
    2012-09-15 11:01:44 [SEVERE] at com.bergerkiller.bukkit.common.config.DataReader.read(DataReader.java:47)
    2012-09-15 11:01:44 [SEVERE] at com.bergerkiller.bukkit.tc.storage.OfflineGroupManager.init(OfflineGroupManager.java:322)
    2012-09-15 11:01:44 [SEVERE] at com.bergerkiller.bukkit.tc.TrainCarts.enable(TrainCarts.java:325)
    2012-09-15 11:01:44 [SEVERE] at com.bergerkiller.bukkit.common.PluginBase.onEnable(PluginBase.java:179)
    2012-09-15 11:01:44 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
    2012-09-15 11:01:44 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:365)
    2012-09-15 11:01:44 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
    2012-09-15 11:01:44 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:265)
    2012-09-15 11:01:44 [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:247)
    2012-09-15 11:01:44 [SEVERE] at net.minecraft.server.MinecraftServer.i(MinecraftServer.java:296)
    2012-09-15 11:01:44 [SEVERE] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:275)
    2012-09-15 11:01:44 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:225)
    2012-09-15 11:01:44 [SEVERE] at net.minecraft.server.DedicatedServer.init(DedicatedServer.java:140)
    2012-09-15 11:01:44 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:378)
    2012-09-15 11:01:44 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
    2012-09-15 11:01:44 [SEVERE] Caused by: java.lang.ClassNotFoundException: org.bukkit.craftbukkit.util.LongObjectHashMap
    2012-09-15 11:01:44 [SEVERE] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:34)
    2012-09-15 11:01:44 [SEVERE] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
    2012-09-15 11:01:44 [SEVERE] at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    2012-09-15 11:01:44 [SEVERE] at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    2012-09-15 11:01:44 [SEVERE] ... 19 more
    2012-09-15 11:01:44 [INFO] [Train Carts] Loading chunks near trains...
    2012-09-15 11:01:44 [SEVERE] Error occurred while enabling Train Carts v1.71.5 (Is it up to date?)
    java.lang.NoClassDefFoundError: org/bukkit/craftbukkit/util/LongObjectHashMap
    at com.bergerkiller.bukkit.tc.storage.OfflineGroupMap.<init>(OfflineGroupMap.java:15)
    at com.bergerkiller.bukkit.tc.storage.OfflineGroupManager.<init>(OfflineGroupManager.java:108)
    at com.bergerkiller.bukkit.tc.storage.OfflineGroupManager.get(OfflineGroupManager.java:43)
    at com.bergerkiller.bukkit.tc.storage.OfflineGroupManager.get(OfflineGroupManager.java:49)
    at com.bergerkiller.bukkit.tc.storage.OfflineGroupManager.initChunks(OfflineGroupManager.java:337)
    at com.bergerkiller.bukkit.tc.storage.OfflineGroupManager.init(OfflineGroupManager.java:326)
    at com.bergerkiller.bukkit.tc.TrainCarts.enable(TrainCarts.java:325)
    at com.bergerkiller.bukkit.common.PluginBase.onEnable(PluginBase.java:179)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:365)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:265)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:247)
    at net.minecraft.server.MinecraftServer.i(MinecraftServer.java:296)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:275)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:225)
    at net.minecraft.server.DedicatedServer.init(DedicatedServer.java:140)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:378)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
     
  18. Offline

    bergerkiller

    vacnoa
    Use the latest beta build, 1.3.2 R0.1 I believe.
     
  19. Offline

    vacnoa

    Thank you, now I have no errors, but when you use the portal I appear in space, you see de pictures.

    I appear here.

    [​IMG][​IMG]

    [​IMG]
     
  20. Offline

    bergerkiller

    vacnoa
    Uhmm TrainCarts can't possibly cause that...
    Are you sure all other plugins are compatible with CB 1.3.2 R0.1?
     
  21. Offline

    vacnoa

    That only happens when I use train-portal
     
  22. Offline

    bergerkiller

    vacnoa
    Ah that explains it better, could be something changed in CraftBukkit causing it to glitch the player now. (it uses an instant teleportation mechanism to prevent the train from dying in the process, which may be a bit glitchy for player passengers. It took a while to make it work initially, wouldn't be surprised if it stopped working)

    Anyhow, I got the 'ground item' transferring working. It can now collect and deposit items. Aliases 'pick( )up' and 'drop( )items'. Finishing off the item animation bit, as it is a bit glitchy. (there are some fixes needed in BKCommonLib)
     
  23. Offline

    SinCalChewy

    Yesss! I can't wait, that will open up so many industrial opportunities. Thanks for all your work on this, that will be fun stuff for sure. :)
     
  24. Offline

    bergerkiller

    I will probably re-publish all of my plugins as a new major version (2.0). I decided to put most of the native logic in BKCommonLib, which includes hidden variables and all. It will also has versioning to make sure plugins complain when an outdated BKCommonLib is used. This in total should reduce the amount of 'wrong version' problems people are having.
     
  25. bergerkiller
    So is it a Minecraft, Bukkit, TrainCarts Problem? (The Thing with the fly Away Player :D )
    Any way to fix it? Thanks!


    @ All of you
    What do you recommend for an automatic Subway-System?
    The Trains should run without spawning again...and there should be a Timetable "30secs till the Train arrives"

    Any Suggestions?
     
  26. Offline

    bergerkiller

    Johnny Crazy
    I think I fixed it, but can't be sure.

    I recommend you make a hold-up area somewhere. You can use detector signs to 'wait' trains before letting them go, sort of how real trains wait. (or use the waiter sign in combination)
     
  27. bergerkiller
    Thanks, i will try that

    Does the detector signs work over curves?
     
  28. Offline

    bergerkiller

    Johnny Crazy
    Yes, the detector area does not have to be all-straight.

    I'm almost done with a new version, but it requires one more bugfix for it to make it unfortunately. I will have to continue with it tomorrow, unless I manage to resolve it in < 1 hour...
     
  29. Offline

    CommanderGizmo

    I filed a ticket on it, but I wanted you to know that I am still seeing issues with trains getting stuck when a server is stopped and started again. The odd bit is that it seems to work great when doing using the 'reload' command.

    I still can't perform actions on golden_apple.
     
  30. Offline

    bergerkiller

    CommanderGizmo
    I think those bugs are already fixed, you can look at the pretty big amount of commits in the past 2 days. I'll have to look at golden_apple though... (the ID does work?)
     
  31. Offline

    bergerkiller

    Status update:
    * Formatting and documentation fixes
    * Added Ground item collect and depositing
    * Fixed ghost minecart/bugged minecart issues
    * Added configurable instant-destroy for creative players
    * Fixed spawned trains not triggering signs
    * Fixed multiple station bugs
    * Fixed the fall damage when 'jumping' off ramps
    * Fixed the suffocation damage after teleporting
    * Added additional transfer material aliases (golden apple!)
    * Fixed spawner signs not working at 90-degree angle
    * Fixed train teleportation
    * Fixed the bouncing minecarts (no synched movement)
    * Fixed detector sign failing at unloaded chunks

    Still need to test a lot, so here is a test version for the time being. Note that other plugins that use BKCommonLib, like NoLagg, MyWorlds and Redstone Mania <do not!> work with this BKCommonLib version. A lot has changed, and I will update all of my plugins accordingly in the end. These versions are already prepared, so it will not take long.

    https://dl.dropbox.com/u/3681706/TrainCarts v1.71.6 TEST.zip
     

Share This Page