Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teleport to different world #532

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

vyPal
Copy link
Contributor

@vyPal vyPal commented Feb 7, 2025

Implements #511

Description

This PR adds one new public function to the Player struct:

  • pub async fn teleport_world(self: Arc<Self>, new_world: Arc<World>, position: Option<Vector3<f64>>, yaw: Option<f32>, pitch: Option<f32>) - Teleport player to new world, this will also teleport the player to the specific coordinates provided by the caller. It will not check the coordinates for correctness (like if the y isn't below the surface). If no coordinates are provided, it will select the default spawn coordinates for the new_world.

Testing

Please follow our Coding Guidelines

@vyPal vyPal marked this pull request as ready for review February 7, 2025 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant