forked from PaperMC/Folia
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly handle ender pearl end gateway teleportations
The end gateway is supposed to teleport the person who threw the ender pearl. The changes more closely mirror Vanilla behavior. The current exceptions to Vanilla behavior are: 1. The first teleportation attempt for the end gateway always fails 2. If the ender pearl thrower is riding a vehicle, the thrower is dismounted from their vehicle. I don't see any solutions for #1 right now. The root issue is that since the end gateway does not have a target location, it has to search for one. However, it can _fail_ to find a target location, in which case the teleportation should not occur. Since the search must take place asynchronously, it requires the entity to be removed from the world. For #2, this is because Vanilla's behavior is broken and does not correctly teleport players riding boats. We can fix this by simply dismounting the player and teleporting them separately of their boat, which seems to be what Vanilla is trying to do given it does _not_ try to teleport the root vehicle of the player. This is a partial fix to PaperMC#51
- Loading branch information
1 parent
62b165b
commit b5fc6d0
Showing
1 changed file
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters