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

Sometimes the player falls under the map when changing instances #2017

Open
MelonHell opened this issue Mar 8, 2024 · 2 comments
Open

Sometimes the player falls under the map when changing instances #2017

MelonHell opened this issue Mar 8, 2024 · 2 comments

Comments

@MelonHell
Copy link
Contributor

When I change the player's instance sometimes the player ends up in the void and falls down. The world begins to load only when the player moves to an adjacent chunk.

Also, I noticed that in ChunkLoader, the coordinates of the previous instance are passed, which means unnecessary chunks are loaded.

I noticed that this bug occurs more often when using AnvilLoader or another world loader. The flat world generator works very quickly and less frequently triggers this bug.

https://github.com/SkolkovoLab/Minestom/tree/instance-change-bug-demo

bandicam_2024-03-06_23-35-22-520.1.mp4
@Spliterash
Copy link

A small addition: I found out that this happens only when the player is near a previous chunk.
As I understand it, this happens because the server does not correctly calculate which chunks the player needs to unload
In other words, I managed to fix this problem by moving the lobby to 100000 coordinates, and as a result the lobby chunks were very far away from the minigame chunks.

@domrbeeson
Copy link

domrbeeson commented Apr 16, 2024

I'm experiencing this and can replicate it easily when simulating a slow CPU (docker container with --cpus=0.25) or with a ping above ~200ms. I'm also using my own chunk loader which pre loads all chunks, but it doesn't matter if I pre load or load on demand; it still happens with high frequency.

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

No branches or pull requests

3 participants