Teleport with RetainPassengers flag doesn't appear to retain passengers. #11003
Labels
status: accepted
Disputed bug is accepted as valid or Feature accepted as desired to be added.
type: bug
Something doesn't work as it was intended to.
version: 1.21.4
Expected behavior
I would expect the passengers of an entity to be able to teleport
Observed/Actual behavior
I noticed when a player is riding an entity, if you teleport it (with flags) the player doesn't get teleported.
The player also gets stuck in some weird limbo.
For example if you move a few chunks, the chunks no longer load, and if you attempt to break a block, nothing.
If I relog, the player is then matched up with their vehicle.
Steps/models to reproduce
Test code to reproduce:
I simply make myself ride a sheep, and ran a command with that code.
Plugin and Datapack List
Paper version
Paper version 1.21-39-master@aa8d38d
Other
When looking at vanilla NMS Entity#teleportTo, I see they do the following:
(not sure if I can show Mojang code here, so ill just write short form)
For testing sakes, I decided to incorporate this into CraftEntity's teleport method:
Did a quick build, and did a few simple test runs, the code I provided above now seems to work flawlessly.
The text was updated successfully, but these errors were encountered: