Minecart trains / linked carts

I’m stating a new minecraft world and thought about longer minecraft trains to make transportation easier.

An old (currently unsupported) Bukkit plugins was already made:
http://dev.bukkit.org/bukkit-plugins/traincarts/

Ideas on how to do this:
-place minecarts on a rail
-plugin detects if two carts can or should be linked
-name tags to attach carts

Suggestions?
(Is a plugin like this already in development?)

I did a private plugin for Bukkit like this, that still works today however my licencing with the buyer says im not allowed to release the code outside the grounds of him and me.

What I will say is, I have not seen in Sponge API 2 a way of launching entitys yet, my guess is that it will eventually come to Sponge but its currently not in.

I will also say for anyone who wishes to work on this, it is a simple plugin. Just contain a list of entitys, these entitys need to be minecarts. OnEntityMove (a sponge event) check the distance between two carts and make sure its not out of bounds (so the carts are close enough) if it is, boost the back cart into the other cart and then slow it down the closer it gets to the other cart (so they don’t touch, getting boots of each other). Thats how you would do the main mechanic, as for the other mechanics, Tzk has not said how the plugin should detect the carts that need to be linked … so have some fun with that (i would have it so someone has a cart in there hand and they shift + left click any minecart to add it to the current cart or to create a cart).

Add custom data to the cart containing the UUID of the cart it is linked to. check for custom data on entity move event.

It will likely be more efficient, and you won’t need to worry about saving the list when the world closes.

1 Like