Multiverse / Multiverse-Portals

MV2's implementation of MV1 style portals.
BSD 3-Clause "New" or "Revised" License
121 stars 87 forks source link

(Feature) teleporting all the minecarts #326

Open thiefa opened 10 years ago

thiefa commented 10 years ago

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.

fernferret commented 8 years ago

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

Anuril commented 8 years ago

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

thiefa commented 8 years ago

hi, thanks for looking in to it.

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

fernferret commented 8 years ago

@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!

Anuril commented 8 years ago

@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..^^