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

    andrewpo

    The global flag (/region flag __global__ vehicle-place deny) would stop anyone placing carts anywhere in the world.
    If you want cart placing enabled in certain regions, define a region and set the flag to allow in that region.
     
  3. Offline

    WongBoi

    wait so what version of craft bukkit would go with TC v 1.6....
     
  4. Offline

    danilonba

    hoe kan ik er maar 3 spawnen?
     
  5. Offline

    bergerkiller

    WongBoi as for now it support CB1938 (R4)

    danilonba Bedoel je '3x een train spawnen' of '3 minecart in een trein spawnen'. Voor het laatste, gebruik:
    Om 3 normale minecarts te spawnen. Voor het eerste weet ik het niet zo zeker, ik denk dat je dan redstone logic van een ander soort plugin moet gebruiken...(of een counter maken van redstone...)
     
  6. Offline

    danilonba

    oowh oke bedankt:))
     
  7. Offline

    bergerkiller

    Uploaded a new beta version. I added an eject distance cap (10 blocks by default) changeable in the configuration. Eject signs now eject relative to the sign: leftright/updown/forwardbackward. The fourth line can be used to set the yaw/pitch or only yaw. Other than that, several fixes (therefore new BKCommonLib), including a fix for the furnace item transfer issues. A lot of fixes have been made as well...
     
  8. Offline

    ledhead900

    bergerkiller
    Your latest Beta version locks the server up :/, I removed traincarts its fine but when trains hit a station with timer server cpu spikes up and locks up.


    "Edit"
    Correction: BKCommonLib v1.09 is the cause If I downgrade this to BKCommonLib v1.08 and use the prev traincarts beta the lockup does not occur.

    If it due too the libary not liking your other plugins that use lower version or higher I suggest you sync your git to update your other plugins at same time when u submit a new common-lib, and possibly just make it a separate thing if you can.
     
  9. Offline

    yakasuki

    i get this error
    Code:
    [/5.125.105.170:56858] logged in with entity id 361 at ([minecraft1.1] -220.41956801901162, 63.0, 87.82960993648348)
    2012-02-27 19:23:46 [SEVERE] java.lang.NoSuchFieldError: bN
    2012-02-27 19:23:46 [SEVERE]    at com.bergerkiller.bukkit.tc.NativeMinecartMember.move(NativeMinecartMember.java:690)
    2012-02-27 19:23:46 [SEVERE]    at net.minecraft.server.EntityMinecart.y_(EntityMinecart.java:396)
    2012-02-27 19:23:46 [SEVERE]    at net.minecraft.server.World.entityJoinedWorld(World.java:1262)
    2012-02-27 19:23:46 [SEVERE]    at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:110)
    2012-02-27 19:23:46 [SEVERE]    at net.minecraft.server.World.playerJoinedWorld(World.java:1244)
    2012-02-27 19:23:46 [SEVERE]    at net.minecraft.server.World.tickEntities(World.java:1151)
    2012-02-27 19:23:46 [SEVERE]    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:528)
    2012-02-27 19:23:46 [SEVERE]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435)
    2012-02-27 19:23:46 [SEVERE]    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    2012-02-27 19:23:46 [SEVERE] Unexpected exception
    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:1262)
        at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:110)
        at net.minecraft.server.World.playerJoinedWorld(World.java:1244)
        at net.minecraft.server.World.tickEntities(World.java:1151)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:528)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    2012-02-27 19:24:09 [INFO] CONSOLE: Stopping the server..
    2012-02-27 19:24:09 [INFO] Stopping server
    2012-02-27  
    all i do is place a minecart or I turn on the server with minecarts on it

    wait theres a beta version?

    just wanted to say the beta works fine lol i feel like a idiot for not noticing the beta version

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

    bergerkiller

    ledhead900 Yup, that is true. See the new version of TrainCarts (BKCommonLib 1.10) on GitHub. Was a bug in the 'rotate blockface' function; it never ended rotating it.
     
  11. Offline

    ledhead900

    I see.

    One more thing.

    I can't find any documentation for the new functions of the trains in the beta, maybe I am blind. If there is none tho there should be as it is showing on devbukkit as the main build.
     
  12. Offline

    bergerkiller

    ledhead900 Yeah I am working on writing all of the documentation, but it is quite a lot...
    Progress can be found here:
    http://www.minecraftwiki.net/wiki/Bukkit/TrainCarts

    Still need to add stuff like configuration and commands, but since most of that can be found on the old WIKI, it has low priority. I need to document the new things first...

    Of course, feel free to write a page if you feel like it. :)
     
  13. Offline

    ledhead900

    Be glad too, but I need to learn what the new stuff is first as well ;)
     
  14. Offline

    mboua

    Hi,

    I am testing the new beta (29) and I have a problem that I could'nt resolve by reading the wiki.

    I decided to make 'automatic doors' (with piston) at a station. But everytime a piston put 2 blocks next to the block holding the rail goes on or off, the sound played when a train is arrived at a station is played again, and I must wait once again.

    Here is my sign:
    [train]
    station
    10
    continue

    Here is a cut 'schematic' (O are wooden planks, P is piston and ^ is when it is on, R is rail, A is air, S is the station sign)

    RO^
    OAP
    S

    I have no error, no message, nothing else to explain it. Otherwise, the plugin works !

    Thanks a lot for your help !
    Capture d’écran 2012-02-28 à 01.58.31.png
    Capture d’écran 2012-02-28 à 01.59.11.png
     
  15. Offline

    bergerkiller

    Well the only reason it would possibly re-set the station, is if the station sign, or the block the sign is attached to, receives a power change. I'll see if I can stop this behaviour somehow (don't perform the station routine if the current scheduled actions are the same)

    For now, check all redstone wiring leading to/nearby the sign. It is quite possible that this is causing a disturbance.

    It is also possible that the attached lever is to blame, which is obviously a bug then.
     
  16. Offline

    SupaYoshi

    Hi ive a problem that my minecarts slowdown even when slowdown is off, i have a poweredrail like enough its all in shape, however the carts sometimes slowdown when someone jumps out, and also when the trains drive up, I have powered rails however it sometimes get stuck, and other times doesnt. This is very buggy, also sometimes my trains fall apart even when the track is just straight forward. :)its a pretty logn track however. What setting is wrong?
    This is my config: http://pastebin.com/DK88kJiR
    Default train props: http://pastebin.com/S7R6Aq4G
    Thanks! Please let me know I really love this plugin!
     
  17. Offline

    Junrall

    Hello,
    Is it possible to spawn a cart then use a sign that allows anyone to ride the cart but not allow anyone to destroy the cart? If so, what would be placed on the sign?

    Thanks in advance!
     
  18. Offline

    PenzRules

    I like the progress of your plugin. Portals rotate, carts rotate, even CPU... ;-)
    I built the train system on my neighbor's server.
    There's one circuit for middle-speed-trains and a special highway for some other trains that go partly across and partly within the circuit. I used (station, maxspeed, ) tag and destination signs.

    I put a lever for a destination change trying to trick a chosen minecart to find it's destination before it finds the other same one so it would receive a new destination. As the two different trains share parts of the way including some stations, I placed two different destinations before those stations to make both trains serve them but turn somewhere else later.
    You probably just figured the very little problem:
    The carts don't care about their destination if they find a new one.
    I only wanted small sophisticated stations one track per direction. So I wish you would make the carts only accept new destinations, when they reach their matching one or have none setup.
    I just studied the new wikis, I'll implement some blockers in the tracks. :)
     
  19. Offline

    bergerkiller

    Junrall you can use the property signs to set properties on the train:
    Code:
    [!cart]
    property
    setowner
    uniquename
    Then no one except the 'uniquename' player can destroy the spawned trains. Neither can anyone change properties on the train then. You can also set the owner in DefaultTrainProperties.yml.

    SupaYoshi
    Can I join your server? Since I can't reproduce it here, I need to know exactly what fails...

    PenzRules
    I'll make it so the destination has to match for destination signs to set a destination.
     
  20. Offline

    SupaYoshi

  21. Offline

    bergerkiller

    Uploaded new beta 30:
    - fixes train properties getting removed when a train unloads
    - signs less responsive to redstone changes
    - added d@ for switcher/detector statements to check the destination
    - destination of destination sign is only set if the name matches, is empty or the train dest is empty

    - now 31, station was bugged
     
  22. Offline

    andrewpo

    D: Please don't tell me I have to go through 50+ train stations changing each ejector sign :'(
     
  23. Offline

    bergerkiller

    andrewpo Afraid so :/
    It was the only way to make the ejector sign somewhat understandable...before the change you had to experiment with all the numbers to get what you want. Though, you won't have to change the south-facing signs.
     
  24. Offline

    Junrall

    Hmmm... I seem to still be having problems.
    I've placed a sign below the track, as instructed above, using junrall in-place of uniquename and I have powered the sign... other players are still able to destroy the cart.I have also set myself as the owner in DefaultTrainProperties.yml and still others can break the cart.
    Train info it says that the owner is everyone and cart info say that none owns it.

    Same problem if I use [!train] instead of [!cart]

    I am able to change other properties with signs.

    The sign placement is under a spot of the track that the cart passes over but does not stop at... will this make a difference?

    Also, I have taken a look at the list of properties on the Wiki Properties page and do not see a "setowner" property listed.

    I'm using 1.6 v31. and latest RB Bukkit.
     
  25. Offline

    bergerkiller

    Junrall yeah you are right, must have gone missing during the conversion from 1.54...

    Then for now all you can do is set the owner in the 'DefaultTrainProperties.yml'. Give it some random name. Then, whenever someone spawns a train, it will have this owner and no one else can touch it except enter it.
     
  26. Offline

    andrewpo

    Oh well :p
    I found it quite simple to get the XYZ coordinates of the rail above the ejector, then the XYZ of where to eject players to and put the difference on the sign

    I'll start fixing mine up.
     
  27. Offline

    Junrall

    bergerkiller Setting the owner in the 'DefaultTrainProperties.yml' does not work on carts spawned from a sign.

    I apologize... I think I did a poor job of explaining, in my first post, what I was trying to do...

    So basically I'm trying to set ownership when the cart is spawned from a sign.
    I was not able to set ownership through 'DefaultTrainProperties.yml'... my guess is that 'DefaultTrainProperties' is only for carts placed by players with the proper permissions and not for carts spawned by a sign. Right?

    Which means I'll have to wait for a fix on the 'setowner' sign property... and will gladly do so :p

    Thanks again.
     
  28. Offline

    bergerkiller

    Junrall I'll add it today, it's not too hard to make :)

    Uploaded beta 32. I added the ability to let property signs change the owners of a train/cart. (see WIKI, set/add/remowner)
    Also made a minor tweak in the check if an entity is still loaded. It uses the block location that was previously calculated, and I felt that this was causing some problems. May this fix the disappearing train issues, please let me know.

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

    BlackSoldierB

    When i boot the server i see the following error:

    Show Spoiler

    18:10:00 [INFO] This server is running CraftBukkit version git-Bukkit-1.1-R6-b19
    88jnks (MC: 1.1) (Implementing API version 1.1-R6)
    18:10:00 [SEVERE] Could not load 'plugins\BKCommonLib v1.10.jar' in folder 'plug
    ins'
    org.bukkit.plugin.InvalidPluginException: java.lang.VerifyError: class com.berge
    rkiller.bukkit.common.PluginBase overrides final method getName.()Ljava/lang/Str
    ing;
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:150)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:287)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:211)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:206)
    at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:182)
    at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigur
    ationManager.java:53)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:147)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:407)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    Caused by: java.lang.VerifyError: class com.bergerkiller.bukkit.common.PluginBas
    e overrides final method getName.()Ljava/lang/String;
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:41)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:29)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:41)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:29)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:139)
    ... 8 more
    18:10:00 [SEVERE] Could not load 'plugins\TrainCarts.jar' in folder 'plugins'
    org.bukkit.plugin.UnknownDependencyException: BKCommonLib
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:176)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:206)
    at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:182)
    at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigur
    ationManager.java:53)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:147)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:407)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)

    I use craftbukkit R6 and traincart v32
     
  30. Offline

    bergerkiller

    I don't think they are compatible-yet. It's unfortunate that getName was made final for no particular reason...

    Updated to be used on CraftBukkit build 1988 (R6)

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

    Mycah

    Has anyone tested this with the 1.2 betas? I don't want to update unless this plugin will work with it.
     

Share This Page