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 player between worlds / dimensions #511

Closed
1 task done
vyPal opened this issue Jan 28, 2025 · 2 comments
Closed
1 task done

Teleport player between worlds / dimensions #511

vyPal opened this issue Jan 28, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@vyPal
Copy link
Contributor

vyPal commented Jan 28, 2025

I've searched existing issues and couldn't find a duplicate.

  • I confirm this is not a duplicate.

Is your feature request related to a problem? Please describe.

I am working on a multiverse-like plugin for pumpkin to allow easy management of multiple worlds and dimensions, and I was working on implementing the logic to teleport the player to either the same world but a different dimension, or a entirely different world, but I noticed there was no functionality to do this easily. I tried to make my own implementation of such a function, but I do not have a large understanding of which packets need to be communicated during such a teleport.

Furthermore, I have found that the current structure of certain structs (like the Player and Entity structs) lack support for changing the dimension (the necessary structs are behind a non-mutable shared reference).

So in total it looks like a lot of change will have to take place to allow this, and I sadly don't have the knowledge (or time) to implement such large changes. Therefore I will leave this issue here, so that someone might get to this in the future.

Describe the solution you'd like

Add a method (or multiple methods) to allow moving a player between worlds/dimensions.
Example:

impl Player {
    pub async fn teleport_to_world(&self, destination: Arc<World>, position: Vector3<f64>, yaw: f32, pitch: f32) {}
}
@vyPal vyPal added the enhancement New feature or request label Jan 28, 2025
@vyPal
Copy link
Contributor Author

vyPal commented Feb 3, 2025

I guess I'm adding it myself #524

@vyPal
Copy link
Contributor Author

vyPal commented Feb 7, 2025

or #532

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants