Handling teleportation with passengers via plugins

Status
This thread has been locked.

3clipseFX

Motion//Animations//Graphics
Premium
Feedback score
5
Posts
217
Reactions
31
Resources
0
Hey guys! I'm currently researching into handling teleportation via plugins while having passengers on the entity. At the moment, whenever you have a passenger, teleportation via plugins such as doing /spawn or /tp will not work (I am trying to make this work). However, if you teleport using enderpearls it will work meaning it teleports both the entity and the passengers as shown here: (The armorstand are the wings)
I originally thought the solution would be to change the teleportation cause to enderpearl. However, that was not the case. This means that Minecraft is doing something else while handling teleportation via enderpearls. I'm trying to figure out what exactly that is. I have two hypothesis on what could be happening:

1. Minecraft groups the entities together and teleports both entities to the destination
2. Minecraft has its own way to unmount and remount the passenger before and after teleportation.

If anyone could look into this, that would be greatly appreciated! Thank you for taking the time to read this :)
 
Last edited:
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

3clipseFX

Motion//Animations//Graphics
Premium
Feedback score
5
Posts
217
Reactions
31
Resources
0
Can you show a video of what happens when you try to teleport via /spawn?

It's weird[DOUBLEPOST=1585634436][/DOUBLEPOST]So I figured out that the enderpearl nms code was counted as a mount onto the enderpearl right before it popped at the destination. I tried to replicate that by placing an armorstand and setting myself as a passenger while having a passenger on me. It went like this: . However, this works perfectly if I were to mount it manually as shown here: . Leading me to think that there is now something else that's happening relating to the two events. Just have no idea what it is
 
Last edited:

3clipseFX

Motion//Animations//Graphics
Premium
Feedback score
5
Posts
217
Reactions
31
Resources
0
Have you tried detecting if they have a passenger, deleting said passenger, then resummoning the passenger?
Yea I have unfortunately, it isn't the most optimized way and I receive extreme lag on usage... I'm looking for an alternative
 

3clipseFX

Motion//Animations//Graphics
Premium
Feedback score
5
Posts
217
Reactions
31
Resources
0
Ah, teleporting might be better? Although it would turn one teleport event into three.

I think you might just have to fork Spigot and make your changes to replicate what is built in.
Would it be possible to dive into the nms code and see what is being done to handle the vanilla enderpearl teleportation?
 
Status
This thread has been locked.
Top