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



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

    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.


    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.

    - Train-sign message handling using SignLink (low priority)
    - Minecart use permissions (for individual carts?) such as Storage Minecarts


    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.


    Show your appreciation for my plugins by donating
  2. Offline


    anzGER I am going to bed now (unfortunately), but do try beta 17. I did change something that *could* affect what you were having, but it is doubtful nevertheless. Also, use /cart info on the cart you tried to enter and check if players are REALLY allowed to enter it. This could even be a yaml loading bug.
  3. Offline


    kk, ty i will test it... if there will be still problems, i will inform u ;) gn8
  4. Offline


    Hi bergerkiller,

    i've installed beta 17 and the trains spawn now backwards. When use "pmmmmmm" the powered minecart is at the end of the train instead at the front?
  5. Offline


    Nevermind about my last post on the cart spawning issue, I found out the solution to that problem. Only thing now is, with beta 1.7 (might have been going on for one or two beta versions before), the cart destination path finding appears to no longer be working.
  6. Offline


    ok it doesnt work for me, even with v17 -.- . maybe another plugin makes trouble in combination with TC.
    bergerkiller, do u know any problmes between your plugin and some others? i have BlockOnGlass, ScrollingMenuSign, RedstoneLigjtning, Scavenger, WorldEdit and the EssentialCollection.

    i will test it later. thanks for the idea with modloader ;)

    ok, i found out, that modloader or minecraft-forge makes all these trouble. i took a new craftbukkit,jar and now all works fine (until now x) ).

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Oct 10, 2018
  7. Offline


    Problems here as well. Running v16

    2012-02-07 20:52:33 [SEVERE] Could not pass event org.bukkit.event.block.BlockRedstoneEvent to Train Carts
            at org.bukkit.plugin.RegisteredListener.callEvent(
            at org.bukkit.plugin.SimplePluginManager.callEvent(
            at net.minecraft.server.BlockSign.doPhysics(
            at net.minecraft.server.World.k(
            at net.minecraft.server.World.applyPhysics(
            at net.minecraft.server.BlockRedstoneWire.g(
            at net.minecraft.server.BlockRedstoneWire.doPhysics(
            at net.minecraft.server.World.k(
            at net.minecraft.server.World.applyPhysics(
            at net.minecraft.server.BlockRedstoneWire.g(
            at net.minecraft.server.BlockRedstoneWire.doPhysics(
            at net.minecraft.server.World.k(
            at net.minecraft.server.World.applyPhysics(
            at net.minecraft.server.BlockRedstoneWire.g(
            at net.minecraft.server.BlockRedstoneWire.doPhysics(
            at net.minecraft.server.World.k(
            at net.minecraft.server.World.applyPhysics(
            at net.minecraft.server.BlockRedstoneWire.g(
            at net.minecraft.server.BlockRedstoneWire.doPhysics(
            at net.minecraft.server.World.k(
            at net.minecraft.server.World.applyPhysics(
            at net.minecraft.server.BlockRedstoneWire.g(
            at net.minecraft.server.BlockRedstoneWire.doPhysics(
            at net.minecraft.server.World.k(
            at net.minecraft.server.World.applyPhysics(
            at net.minecraft.server.BlockRedstoneWire.g(
            at net.minecraft.server.BlockRedstoneWire.doPhysics(
            at net.minecraft.server.World.k(
            at net.minecraft.server.World.applyPhysics(
            at net.minecraft.server.BlockButton.interact(
            at net.minecraft.server.BlockButton.attack(
            at net.minecraft.server.ItemInWorldManager.dig(
            at net.minecraft.server.NetServerHandler.a(
            at net.minecraft.server.Packet14BlockDig.handle(SourceFile:43)
            at net.minecraft.server.NetworkManager.b(
            at net.minecraft.server.NetServerHandler.a(
            at net.minecraft.server.NetworkListenThread.a(
            at net.minecraft.server.MinecraftServer.w(
    Caused by: java.lang.reflect.InvocationTargetException
            at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            ... 40 more
    Caused by: java.lang.NullPointerException
            ... 44 more
    Using a cart spawner.
  8. Had this one too, forgot to write it down, restarted my server, did not occure anymore...
  9. Offline


    Heya, you got any "MODS" running? Or just bukkit + plugins.
  10. Offline



    im running also the planes mod, but disabled it via modloader.
  11. Offline


    Which means you have Modloader running.

    Iam starting to think modloader is the issue.

    As you just have the planes mod, is it possible for you to use a "vanilla" bukkit server file on your server and see if you then can enter the trains?

    We are running "RedPower" so if i remove modloader and MCforge, our world will get corrupted.
  12. Offline


    Snap, thats what i was scared off.

    No way for me to solve it on my own then as i can not run the server without Modloader or Forge.

    Bergerkiller, is that something you can take a look into?
  13. Offline

    Don Redhorse

    well I guess you should ask the guys from modloader and / forge to fix their code... atm traincarts is one plugin which breaks... tomorrow it can be 2... next week it could be 3000 .... ähm... you know what I mean...
  14. Offline


    I was asking (meant it more like) if Bergerkiller could take a look. Actually not by looking into his code but by maybe contacting those guys/girls from modloader/ minecraft forge.

    Third party communication (me or any other plugin-user) might just delay everything.
  15. Offline


    I seem to be getting this whenever I try to use my cartspawner.
  16. Offline


    kinkinhood Happens when spawning on a one-track-long piece of track (or sign facing wrongly)
    Fixed it here now, error will be gone in next update.

    Next update will also bring:
    anzGER It is possible that modloader uses the older source code for the minecart entities; TrainCarts then fails to hook into the entity minecart because fields got changed. Nothing I can do about it, ask Modloader if they can update the 'EntityMinecart' and 'Entity' source files to the newest CraftBukkit build. (and, if they changed some fields on purpose, undo these changes as they will break a lot of other plugins as well)
    Mycah likes this.
  17. Offline


    Nice plugin. Really find it useful on my RP Server
  18. Offline


    The ghost entities when reloading - issue - is now fixed. It now runs a delayed task which clears all glitched entities from the server.
  19. Offline


    1. Craftbukkit 1818
    2012-02-11 18:33:58 [INFO] [WorldGenerationControl] Loading WorldGenerationControl v2.6.
    2012-02-11 18:33:58 [INFO] [WorldGenCtrl] v2.6 Loaded
    2012-02-11 18:33:58 [INFO] [SuperCauldrons] Loading SuperCauldrons v1.2.1.
    2012-02-11 18:33:58 [INFO] [SuperCauldrons] Version 1.2.1 by Zach Hinchy ( has been enabled.
    2012-02-11 18:33:58 [INFO] [FalseBookBlock] Loading FalseBookBlock v0.91alpha.
    2012-02-11 18:33:58 [INFO] [ FalseBook Block ] 3100 Books loaded!
    2012-02-11 18:33:58 [INFO] [ FalseBook Block ] 2 Cauldrons successfully loaded.
    2012-02-11 18:33:58 [INFO] [ FalseBook Block ] FalseBookBlock v0.91alpha by GeMo enabled
    2012-02-11 18:33:58 [INFO] [BukkitCompat] Loading BukkitCompat vr16B.
    2012-02-11 18:33:58 [INFO] MCMACOMPAT r16B
    2012-02-11 18:33:58 [INFO] McMyAdmin Compatibility Plugin version r16B started.
    2012-02-11 18:33:58 [INFO] [PermissionsBukkit] Loading PermissionsBukkit v1.2.
    2012-02-11 18:33:58 [INFO] PermissionsBukkit v1.2 is now enabled
    2012-02-11 18:33:58 [INFO] [Train Carts] Loading Train Carts v1.53.
    2012-02-11 18:33:58 [INFO] [TrainCarts] 1 Train has been loaded in 1 world. (1 Minecart)
    2012-02-11 18:33:58 [INFO] [TrainCarts] version 1.53 is enabled!
    2012-02-11 18:33:58 [INFO] [MorePhysics] Loading MorePhysics v1.6.
    2012-02-11 18:33:58 [INFO] MorePhysics version 1.6 is enabled!
    2012-02-11 18:33:58 [INFO] [MorePhysics] Permissions NOT detected. Giving permission to ops.
    2012-02-11 18:33:58 [INFO] [Runecraft] Loading Runecraft v0.1.
    2012-02-11 18:33:58 [INFO] [Runecraft] Runecraft plugin enabled!
    2012-02-11 18:33:58 [INFO] [Runecraft] Rune blacklist with 0 runes loaded.
    2012-02-11 18:33:58 [INFO] [Runecraft] Loaded:
    2012-02-11 18:33:58 [INFO] [Runecraft]  - 0 waypoints, 0 teleporters
    2012-02-11 18:33:58 [INFO] [Runecraft]  - 0 position runes
    2012-02-11 18:33:58 [INFO] [Runecraft]  - 0 rune pads
    2012-02-11 18:33:58 [INFO] [Runecraft]  - 0 logic pads
    2012-02-11 18:33:58 [INFO] [Runecraft] World 'world': id 0
    2012-02-11 18:33:58 [INFO] [Runecraft] Runecraft 2.10.4 initialized.
    2012-02-11 18:33:58 [INFO] [Runecraft] World 'world_nether': id 1
    2012-02-11 18:33:58 [INFO] [Runecraft] World 'world_the_end': id 2
    2012-02-11 18:33:58 [INFO] [SpoutEssentials] Loading SpoutEssentials v3.9.2.
    2012-02-11 18:33:59 [INFO] SpoutEssentials v3.9.2 is enabled!
    2012-02-11 18:33:59 [INFO] SpoutEssentials is made by skawke :)
    2012-02-11 18:33:59 [INFO] SpoutEssentials: WorldGuard Module disabled
    2012-02-11 18:33:59 [INFO] [SpoutEssentials] Initiating auto-update...
    2012-02-11 18:33:59 [INFO] [SpoutEssentials] You already have the latest version of SpoutEssentials.
    2012-02-11 18:33:59 [INFO] Permission system not detected, defaulting to OP
    2012-02-11 18:33:59 [INFO] [FalseBookCore] Loading FalseBookCore v0.91alpha.
    2012-02-11 18:33:59 [INFO] [ FalseBook Core ] using PermissionsBukkit for Permissions!
    2012-02-11 18:33:59 [INFO] [ FalseBook Core ] FalseBookCore v0.91alpha by GeMo enabled!
    2012-02-11 18:33:59 [INFO] [mcMMO] Loading mcMMO v1.2.07.
    2012-02-11 18:33:59 [INFO] [mcMMO] Using Bukkit Permissions.
    2012-02-11 18:33:59 [INFO] Loading Config File...
    2012-02-11 18:34:00 [INFO] mcMMO version 1.2.07 is enabled!
    2012-02-11 18:34:00 [INFO] [dynmap] Loading dynmap v0.30-782.
    2012-02-11 18:34:00 [INFO] [dynmap] Using Bukkit Permissions (superperms) for access control
    2012-02-11 18:34:00 [INFO] [dynmap] Detected Spout
    2012-02-11 18:34:00 [INFO] [dynmap] Loaded 0 Spout custom blocks
    2012-02-11 18:34:01 [INFO] [dynmap] Loaded 14 shaders.
    2012-02-11 18:34:01 [INFO] [dynmap] Loaded 82 perspectives.
    2012-02-11 18:34:01 [INFO] [dynmap] Loaded 7 lightings.
    2012-02-11 18:34:06 [INFO] jetty-8.0.y.z-SNAPSHOT
    2012-02-11 18:34:06 [INFO] Started [email protected]:8123 STARTING
    2012-02-11 18:34:06 [INFO] [dynmap] version 0.30-782 is enabled - core version 0.30-23
    2012-02-11 18:34:06 [INFO] [dynmap] Loaded 3 maps of world 'world'.
    2012-02-11 18:34:06 [INFO] [dynmap] Loaded 2 maps of world 'world_nether'.
    2012-02-11 18:34:06 [INFO] [dynmap] Loaded 2 maps of world 'world_the_end'.
    2012-02-11 18:34:06 [INFO] [Factions] Loading Factions v1.6.4.
    2012-02-11 18:34:06 [INFO] [Factions v1.6.4] === ENABLE START ===
    2012-02-11 18:34:06 [INFO] [Factions v1.6.4] No permission plugin detected. Defaulting to native bukkit permissions.
    2012-02-11 18:34:06 [INFO] [Factions v1.6.4] Loading board from disk
    2012-02-11 18:34:06 [INFO] [Factions v1.6.4] Found and will use features of Spout v721
    2012-02-11 18:34:06 [INFO] [Factions v1.6.4] Economy integration is disabled, and the plugin "Vault" is not installed.
    2012-02-11 18:34:06 [INFO] [Factions v1.6.4] === ENABLE DONE (Took 115ms) ===
    2012-02-11 18:34:06 [INFO] [Citizens] Loading Citizens v1.1.4.
    2012-02-11 18:34:06 [INFO] [Citizens] NPC types loaded: quester, guard, trader, healer, blacksmith, wizard
    2012-02-11 18:34:07 [INFO] [Citizens] Permissions system found (PermissionsBukkit v1.2)
    2012-02-11 18:34:07 [INFO] [Citizens] version [1.1.4] loaded.
    2012-02-11 18:34:07 [INFO] [Dynmap-Factions] Loading Dynmap-Factions v0.13.
    2012-02-11 18:34:07 [INFO] [Dynmap-Factions] initializing
    2012-02-11 18:34:07 [INFO] [Dynmap-Factions] version 0.13 is activated
    2012-02-11 18:34:07 [INFO] [CitizenSkins] Loading CitizenSkins v1.0.0.3-Beta.
    2012-02-11 18:34:07 [INFO] [CitizenSkins] CitizenSkins Initialized
    2012-02-11 18:34:07 [INFO] [CitizenSkins] Successfully hooked into Spout!
    2012-02-11 18:34:07 [INFO] [CitizenSkins] Successfully hooked into Citizens!
    2012-02-11 18:34:07 [INFO] [CitizenSkins] Version: Is now Enabled
    2012-02-11 18:34:07 [INFO] [ FalseBook Block ] 0 Areas loaded.
    2012-02-11 18:34:07 [INFO] [ FalseBook Block ] 0 Bridges successfully loaded.
    2012-02-11 18:34:07 [INFO] [ FalseBook Block ] 0 Doors successfully loaded.
    2012-02-11 18:34:07 [INFO] [ FalseBook Block ] 54 protected gateblocks successfully loaded.
    2012-02-11 18:34:07 [INFO] [Citizens] Loaded 10 NPCs.
    2012-02-11 18:34:07 [INFO] [Citizens] Loaded 0 quests.
    Everything seems ok, but when I try to enter a minecraft with traincarts enabled ;

    2012-02-11 18:35:49 [SEVERE]at
    2012-02-11 18:35:49 [SEVERE]at net.minecraft.server.EntityMinecart.y_(
    2012-02-11 18:35:49 [SEVERE]at net.minecraft.server.World.entityJoinedWorld(
    2012-02-11 18:35:49 [SEVERE]at net.minecraft.server.WorldServer.entityJoinedWorld(
    2012-02-11 18:35:49 [SEVERE]at net.minecraft.server.World.playerJoinedWorld(
    2012-02-11 18:35:49 [SEVERE]at net.minecraft.server.World.tickEntities(
    2012-02-11 18:35:49 [SEVERE]at net.minecraft.server.MinecraftServer.w(
    2012-02-11 18:35:49 [SEVERE]at
    2012-02-11 18:35:49 [SEVERE]at
    2012-02-11 18:35:49 [SEVERE] Unexpected exception
    java.lang.NoSuchFieldError: bN
    at net.minecraft.server.EntityMinecart.y_(
    at net.minecraft.server.World.entityJoinedWorld(
    at net.minecraft.server.WorldServer.entityJoinedWorld(
    at net.minecraft.server.World.playerJoinedWorld(
    at net.minecraft.server.World.tickEntities(
    at net.minecraft.server.MinecraftServer.w(
    And then I got a time out exception, all players are kicked, and the server keeps running but does not respond.

    Here is the list of plugins I'm using ;

    - Citizens and citizensskins
    - Dynmap and dynmap factions
    - Factions
    - Falsebook (Core and Blocks, not the cart part)
    - MorePhysics
    - Permission Bukkit
    - Runecraft
    - Spout & spoutessentials
    - SuperCauldron
    - MCMMO

    I'll try to find which of them is causing this incompatibility
  20. Offline


    Slowpoke.jpg ;)

    Download the newest CraftBukkit recommended build (1846) and download TrainCarts for 1846 beta 17 (or 18?) on GitHub. (see the links below the main page)

    Ok new BETA is up (18). In this one ALL item transferring is implemented, except crafting.

    It is also compatible with the newer BKCommonLib I released yesterday for NoLagg. (1.07, it is compatible with NoLagg)

    Other than that, you can now use ! in front of the train/cart name to invert power. Still heavily working on the WIKI page to get it updated...

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


    Did something change about how station signs work? They're now no longer stopping carts.(or is it that signs now have to be attached to the block that the track is on rather than beneath it?)

    edit: trying a few other things it seems signs are now only working if they're put on the side of the trackblock they're affecting, which causes alot of issues with my entire setup.
  22. Offline


    I love this plugin, but is there a way to disable the plugin in only one world?
  23. Offline


    kinkinhood yup, you can now infinitely stack signs below the tracks: wall signs now target the first piece of track found when looking UP from the block the sign is attached to. For example, a pillar of signs below a piece of track, all signs attached to this pillar target that piece of track.

    SKG.gamer with how it's implemented right now, this is *somewhat* possible. Then I have to deny the conversion from minecart to traincarts minecart on certain worlds.
  24. Offline


    Alright, I think I understand what you mean now for that.

    Do tags need to be moved to a pillar as well?

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


    There are some issues with the current sign tracking; right now signs have to be attached to the block below the track as well. Now fixing this, plus several performance fixes. (it was looking for rails for EVERY tick for EVERY sign a minecart was on top of. This was causing a noticeable performance loss (tick rate), especially if you use a lot of signs.


    Uploaded B19 fixing that issue, and it is now possible to use the item shortcuts on signs:
  26. Offline


    We have created a railway on our server which goes in a loop for a fast way to get between us. The point being that you just went underground, waited for max 30 sec and a train would arrive, wait a moment and launch and drive in a circle. But for it to have that little time between each train, multiple trains are needed, all on the same looping railway. This creates a bug where all the trains, within 10 minutes, hit eachother and become one train even though launched at a 50 second interval (2:30 for entire lap) to start with. Do you know what the cause of this might be?
    Craftbukkit 1.1-R1 with TrainCarts 1.6-Beta14
  27. Offline


    NopeDK there are a lot of randoms involved, but my guess is that one trains runs out of loaded chunks and disables itself. Then another train comes speeding ahead, hits the train that is in a frozen state and gets linked.

    To make sure this doesn't happen, set 'keepChunksLoaded' to true on the spawned trains. (not sure if you can set it using property signs)
  28. Offline


    When i place a minecart why does my server crash?
  29. Offline


    Cart spawners seem to not be working now. I'm not getting any error code either, it's simply not responding to a redstone charge going to it.
  30. Offline


    kinkinhood see the new beta 20 build

    1. Make sure you use the latest CraftBukkit version
    2. Download the latest beta for CB 1846 HERE
  31. Offline


    Alright, so spawners now work, stations won't launch carts anymore though.

Share This Page