Preserve rotation on teleport command and add PlayerChangedWorldEvent for teleportAsync #395

Open
luigiofthebakery wants to merge 2 commits from luigiofthebakery/fixes2 into ver/1.21.8
luigiofthebakery commented 2025-09-21 09:56:10 +02:00 (Migrated from github.com)

When using the teleport command, rotation (pitch and yaw) was not preserved when teleporting to an entity, or in any situation where it wasn't explicitly specified in the command parameters. The first commit fixes that.
The second commit adds back PlayerChangedWorldEvent to fire after teleportAsync is called, if the entity is a player and they are teleporting to a new world.

When using the teleport command, rotation (pitch and yaw) was not preserved when teleporting to an entity, or in any situation where it wasn't explicitly specified in the command parameters. The first commit fixes that. The second commit adds back PlayerChangedWorldEvent to fire after teleportAsync is called, if the entity is a player and they are teleporting to a new world.
Euphillya (Migrated from github.com) reviewed 2025-09-22 19:01:22 +02:00
Euphillya (Migrated from github.com) commented 2025-09-22 19:01:14 +02:00

I don't think this is the good solution, because here we have 1 tick delay after the player has changed world

I don't think this is the good solution, because here we have 1 tick delay after the player has changed world
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin luigiofthebakery/fixes2:luigiofthebakery/fixes2
git switch luigiofthebakery/fixes2

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch ver/1.21.8
git merge --no-ff luigiofthebakery/fixes2
git switch luigiofthebakery/fixes2
git rebase ver/1.21.8
git switch ver/1.21.8
git merge --ff-only luigiofthebakery/fixes2
git switch luigiofthebakery/fixes2
git rebase ver/1.21.8
git switch ver/1.21.8
git merge --no-ff luigiofthebakery/fixes2
git switch ver/1.21.8
git merge --squash luigiofthebakery/fixes2
git switch ver/1.21.8
git merge --ff-only luigiofthebakery/fixes2
git switch ver/1.21.8
git merge luigiofthebakery/fixes2
git push origin ver/1.21.8
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Minecraft/Folia!395
No description provided.