Multiverse-Portals icon indicating copy to clipboard operation
Multiverse-Portals copied to clipboard

(Feature) teleporting all the minecarts

Open thiefa opened this issue 11 years ago • 5 comments

Hi, Is there a way to make MV-Portals teleport any minecart that enters a gate?

i use Bytecart as railroad system, but it needs chestcarts as track/destination updaters/checkers, so it would be important for me, that chestcarts (and any other carttyp) can use the portals from gate to gate, so the network knows of each other.

thiefa avatar Jun 18 '14 21:06 thiefa

There's an open pull-request related to this: #414

fernferret avatar Mar 06 '16 21:03 fernferret

I can't verify that my patch works with Bytecart, tested only with normal chestcarts/hoppercarts.

Anuril avatar Mar 09 '16 22:03 Anuril

hi, thanks for looking in to it.

aslong as it teleports the "inventory" of any cart proper, it will work just fine with bytecart.

thiefa avatar Mar 09 '16 23:03 thiefa

@Anuril I haven't forgotten about your Pull Request :smile: I cleaned all of the old crusty issues out as of last night.

I'll try to get around to looking at it tonight!

fernferret avatar Mar 09 '16 23:03 fernferret

@thiefa, like i said, not ANY cart proper.

My code only copies the inventory of Storage Minecarts and Hoppers. I explicitly check for those two types of carts, as you can see in Line 91 of the File MVPVehicleListener.java

In the docs you can see that only those two Minecarts extend org.bukkit.inventory.InventoryHolder, which means no powered carts f.ex can be transported with inventory. (coal et al.)

https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/minecart/package-tree.html

@FernFerret: No Problem^^ It's already working on my server, which is why I initially fixed it :) Not just complaining to the developer but doing my part if I can..^^

Anuril avatar Mar 10 '16 07:03 Anuril