TrainCarts
TrainCarts Development has moved to SpigotMC.
You can get the new versions at the following URL:
https://www.spigotmc.org/resources/traincarts.39592/
This page is no longer being actively monitored, please seek for support on SpigotMC.
Plugin: TrainCarts - Linked Minecarts, sign-redstone systems, easy to use and realistic
Version: v1.73.0
Build: 1.7.2 R0.1/R0.2
Incompatible with: RailCraft
Description
This plugin looks for suitable Minecarts and links them together if possible. When two Minecarts are being "linked", the Minecarts will act as one single moving train.
Once carts are successfully linked, an effect is played and their velocity is shared in combination with an individual factor for each Minecart, which is used to remain a steady gap between carts. This gap is adjustable, the force at which this happens as well.
End result: a train! You can move it, make a roller-coaster out of it, split it in half, watch trains collide, whatever you want to do with trains. :)
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. This feature is disabled by default. (only affects dropped items). If you want to display arrival times on signs (see redstone circuit part) you need SignLink, see the downloads on the bottom of the page.
As for 1.35 you can set train properties to make 'special' trains, or to 'finalize' a train

Links
For configuration, permissions and how-to's, see the Wikipedia page (it is rather long):
Note that I would prefer having comments, bug reports and others in the main Bukkit page, since I visit that site the most. :)
Addons
Special Addons for TrainCarts
Features
- Link minecarts using collision: no commands needed to make a train
- Move trains as easily as you would with single Minecarts
- Store trains to file for persistence during reloads and server restarts
- Use sign-redstone circuits for subway systems, complete railroads and much more
- Station to gracefully stop and launch trains
- Spawn
- Teleport
- Property setters
- Tag systems to switch certain tracks based on tags on the train
- Destination systems to make your train travel to far-away lands all on it's own
- Supports Minecart Mania's features
- Infinite minecart speeds are possible
- Push-away: Push mobs, players and items away from your trains to keep them running
- Everything is configurable, if something proves not to be, I will make it that way
FAQ
When players are near, trains reach their destinations. With no one near, they don't. What do I do?
By default trains do not keep chunks loaded, and they will unload once they move into unloaded chunks. To make trains keep the chunk area (and themselves) around them loaded, set the 'keepchunksloaded' property to True. This can be done using the /train keepchunksloaded true command, using a property sign or by changing it to true in the DefaultTrainProperties.yml file. For more information about train properties, see here.
Why not boats?!?!
Incompatibilities
If you have another plugin that performs similar Minecart replacement techniques, it is likely that TrainCarts will not function or function poorly. For the 'chunk persistence' part of this plugin, other plugins that unload chunks without firing events result in this feature failing. Minebackup is known for having this problem.
Metrics
This plugin sends server count statistics to MCStats.org. You can (globally) opt out in the PluginMetrics/config.yml file.







-
View User Profile
-
Send Message
Posted Nov 9, 2012Don't mean to spam about this but, is there a fix to Crafter signs not working? Built a huge system that depends on it
-
View User Profile
-
Send Message
Posted Nov 9, 2012In addition, I would have a bug or at least a serious improvement suggestion for you to make: In MM, we used the very handy "prefix" for all announcement messages. Our prefix was [METRO], and with the use of colour codes, all messages coming from the metro system were golden.
I tried to do the same with the messageShortcuts in config.yml, by specifying
and then starting all announce signs with "m". That has the disadvantage of replacing all the m's in my signs with [METRO] in chat, which obviously is not what I want.
Is there a prefix parameter somewhere i could use to color and prefix all my "metro messages" as I like? Or, otherwise, could the "m" be escaped somehow in the code handler?
-
View User Profile
-
Send Message
Posted Nov 9, 2012Thank you for your thorough answers; while waiting for an explanation, I ended up playing with some stuff on my test track, and decided to read this conversation a few pages back. Then I learned that 1.72.0 actually had quite a few directional functionalities broken, and switched to 1.72.1 TEST2 build.
Boy did that make a difference: with the help of a few blocker signs on the routes I don't want the carts to take (we use two-way railwork with right-hand side traffic, so basically left tracks are always forbidden), the system is now able to find the right station 100% of the time! With 1.72.0, the route finding functionality seemed severely broken and failed roughly 50% of the time to find the correct station on my test network (of 9 stations). I have yet to test the [+train:west] type of blockers: I am now using [+train:r] type, with the blocker attached "to the side" of the rail, and that seems to work just fine.
When it comes to "to-blockers" vs. "from-blockers": I understand your logic, but how would you then block a certain exit from a square junction, say block the exit to the east (marked with "=") from the following:
You see, you can approach the junction from all four directions. If you set your blocker somewhat (even one block) down the eastern route, then your cart has already gone there and its blocking is "too late". How would you be able to totally forbid that eastern route from being taken on that junction, so that you can arrive FROM the East, but you cannot to TO the East?
-
View User Profile
-
Send Message
Posted Nov 9, 2012@Etsija Well technically the booster rails multiply the velocity with a factor (2 I think), which after some time results in a really really high velocity. So what you are requesting is not changing the slow-down factor (that one can be ignored because there is no slow-down on powered tracks), but increasing the boost factor of powered rails. I can easily add an option for that in the configuration.
The directional setting after train/cart applies to all signs, including the blocker sign. I was messing around with that feature to allow curved rails to function properly. It could very well be there is a bug somewhere. Note that you can also use left/right/forwards/backwards to use a direction relative to the sign, which is most likely a lot easier than nesw.
The reason it is not 'to go' was already partially answered above; all signs 'activate' (including the blocker) when the train/cart comes 'from' a certain direction. As a result, you don't block 'to' a certain direction, you block carts coming 'from' a certain direction. I want to use the same system for all to reduce individual differences which could complicate the plugin.
For path finding, just put the blocker sign where you do not want to train to go. (the same directional stuff is applied) It could be you have to refresh the path finding using /train reroute. (this, because performing path finding to find possible path finding nodes every time you place or break a block is crazy)
No silly questions at all, the only silly questions I know are of people that forget to notice the huge banner stating that you need BKCommonLib. If you pass this simple test, you no longer ask silly question :)
-
View User Profile
-
Send Message
Posted Nov 8, 2012Crafter signs are not doing anything, tested on previously working systems.
-
View User Profile
-
Send Message
Posted Nov 8, 2012Sorry to spam you, but this one I still need to be clear about so I can really get going on implementing your plugin into our metro system: Blocker signs?
I do realise these might be silly questions, but bear with me: I am coming from the MinecartMania land, and it takes some time to get used to your plugin's workings. Anyway, may I compliment you on an excellent plugin - I think it has already implemented some really superb ideas!
-
View User Profile
-
Send Message
Posted Nov 7, 2012Thanks for the quick response, bergerkiller!
Now, to get going and trying your plugin out on one track of our metro system, I'd just need one hint more, regarding friction and powered rails...
We have been using MinecartMania for long and have optimised our powered rails such that they are only needed somewhat 200 blocks apart from each other. Now, with Train Carts, the train speed slows down so fast that there's no way the powered rails will be enough to carry the train from one station to another.
I looked upon the MM code and found that it has a "speed down factor" of 0.96289, which is roughly the same as your default 0.997 (actually, I think yours is better :) So I think it really comes down to the effect of powered rails, which in MM was to multiply the speed by 16, while now I guess we have to rely on game mechanics.
My question is, by playing aroind with your slowDownMultiplier, is it possible to increase the distance the cart can travel not slowing down between two powered rails? We'd really hate to start adding tens of powered rails in a row to our network.
EDIT: Or, of course we can set slowDown to false, that seems to work, but just in case we want to keep a bit of reality and have the powered tracks still with us, then I guess the question is still valid.
-
View User Profile
-
Send Message
Posted Nov 7, 2012@Etsija Slight issue with the destinations logic executing after the minecart got killed. GetGroup returns nothing then, resulting in that. I fixed that up here, but unfortunately I can't publish a test version, because the version is full of test log messages. You can expect a fix for this tomorrow, because I have to fix some problem with the vertical rail first.
Please do report any other issues you may find, then I can fix those too.
-
View User Profile
-
Send Message
Posted Nov 7, 2012No matter, I was able to reduce the size of my setup considerably with a little tinkering of the train station idea. But: This setup for destroying empty carts, copied straight from the wiki:
https://dl.dropbox.com/u/6411310/2012-11-07_23.07.26.png
causes this NPE every time it is activated by an empty cart:
-
View User Profile
-
Send Message
Posted Nov 7, 2012I was able to build a working setup, but it is rather bulky, when compared to a one-block implementation of the MinecartMania...would there be any chance of reducing the size of the setup by using [!train] instead?
-
View User Profile
-
Send Message
Posted Nov 7, 2012@Etsija Yes, you have to combine a switcher sign with a station sign. How to do it is easy: https:dl.dropbox.com/u/3681706/2012-11-07_18.57.58.png
On the other side of the bottom block is a lever, which is toggled by the switcher sign.
It's just a matter of connecting the switching sign with a redstone circuit to your station. In TrainCarts it is simple: no combination signs to do multiple tasks at once; you just connect one sign to another using redstone.
There are a lot of switcher statements, so I recommend you take a look at all of them
-
View User Profile
-
Send Message
Posted Nov 7, 2012Bergerkiller, we are now seriously considering switching over to your plugin, since MM seems to die from the client-server sync problems, here since 1.3.x Minecraft.
One question though: our station design relies pretty heavily on a special case of a station sign/block: one which lets through a cart with a player in it, but stops an empty minecart. Then when a player hops in, the cart takes off.
Is this possible to do with Train Carts? I didn't immediately see how to do it.
-
View User Profile
-
Send Message
Posted Nov 6, 2012@bergerkiller
Wow, I found a workaround.
Put station signs over a powered obsidian block using traincarts blocks.
In normal situation, traincarts handle the station sign and ignore whether obsidian is powered or not.
When server restart, as traincart lost its state about the station pause timer the powered obsidian push the cart back into motion.
Our team rambled round hours long with various hazardous workarounds using redstone signals on command blocks to /train removeall carts at start-up then re-populate the subway network with new trains, timers and so on...
Then I had this last try with the powered obsidian and voila.
It's still kind of a hackish workaround but much much simple and reliable than anything else we could imagine.
-
View User Profile
-
Send Message
Posted Nov 6, 2012@leagris Ah right, that problem. It's a bit hard to fix, because I then have to corrupt the groupdata file format. All I can try to do is store the active action of members and trains in the saved properties file...
-
View User Profile
-
Send Message
Posted Nov 6, 2012@bergerkiller
Bump on this bug because it ruins our subway project with always running trains.
After a server restart, trains are stuck at stations.
http://dev.bukkit.org/server-mods/traincarts/tickets/62-minecarts-dont-continue-moving-in-unloaded-chunks-when/#comments
-
View User Profile
-
Send Message
Posted Nov 5, 2012@bergerkiller
Now looking at the issues with the waiter sign and that the vertical rail is malfunctioning when falling down.
EDIT
New test version, I deemed this necessary because of the glitched curved track logic and other issues.
https:dl.dropbox.com/u/3681706/TrainCarts%20v1.72.1%20TEST3.zip
I haven't looked at the waiter sign/other sign problems yet. I have to fix a weird pushing force for vertical rails first, as it somehow manages to move the minecarts by itself. (mostly visible with trains)
-
View User Profile
-
Send Message
Posted Nov 5, 2012@fsedarkalex I know of the vertical stacking disappearing all of a sudden, it wasn't like that all the time though. Trying to fix that again...
I'll look at all the bugs reported and try to fix them, of course.
-
View User Profile
-
Send Message
Posted Nov 5, 2012Berger, The Playerexit property doesn't work on the 2nd testversion. I think Playerenter will not work also.
PS: Switchers are working fine now ;) I will reboot a new bug later, because I have to film that, and my internetspeed is crap atm *fuuuuu ziggo*
-
View User Profile
-
Send Message
Posted Nov 5, 2012Hi bergerkiller,
we are using TrainCarts at one hand but at the other hand wea re also using build Railway stations using minecraft technology.
The problem is our station depends on Carts being stacked, i mean the fall down into a vertical tunnel and are stored one on top of the next. This results in all Carts stored being linked to a train with your plugin. Worst case the lores are even at the same place (meaning all stuck in each other)
Is it possible to disable any kind of auto-training by collision? So that Trains are only buildable by command? Note: I do WANT the lore to have the changed physics as TrainCarts fixes a bug where carts often get stuck within the vertical storage or even on the rail when there is a block left and right of it.
And a second problem is a bug I think Our station works as follows: When a redstone circuit is triggered a cart drives to a hole where a 45° rail is on the ground. It then stands 45° agains a wall (back side) and the bottom (front side). If I now walk against the front side (which causes the cart to roll upwards the 45° rail) it will roll into the wall block behind the said rail.
I even have found a third problem: If a Cart ever stops on the rail as of any reason it is not possible to manually move it again. There is no way else than destroying and rebuilding it. As soona s you rebuilt the cart you can walk against it to have it starting.
and a last thing: - I only report this here as I wish to get some comments I built a A -> B -> A TrainCart-Station. This means the cart will drive from station A to B and back to A and stop there. It done as folows: Station A is a station sign which has no delay but tells the cart to move into the other (left) direction. Left of it there is an obsidian block (station). Again left of this there is a detector rail connected to the obsidian block which ensures that the cart will come from station B, roll over the Obsidian block and then on the way back stop on top of it.
Station B is only a station sign with 5 secs delay and return.
This setup works great but after a time it suddenly stops working: When I push the button which also enables the obsidian block (to start the travel) the cart rolls to station B, waits 5 secs, rolls back and then it turns right at the detector rail instead of driving over it.
Thanks in advance =)
-
View User Profile
-
Send Message
Posted Nov 5, 2012Thanks Berger, I'll update later today. Hope that the switcher and destinations are working proper now.