Chunk loading is not working #2140
-
After running the debugger for a while i discovered that chunks were simply not loading even though I explicitly tried to load them, why? |
Beta Was this translation helpful? Give feedback.
Answered by
ZakShearman
May 12, 2024
Replies: 1 comment 1 reply
-
InstanceContainer#loadChunk returns a CompletableFuture: https://github.com/Minestom/Minestom/blob/master/src/main/java/net/minestom/server/instance/InstanceContainer.java#L240 You need to wait these completable futures (CompletableFuture.allOf might be useful for you here) for the chunks to be loaded. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
KianBrose
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
InstanceContainer#loadChunk returns a CompletableFuture: https://github.com/Minestom/Minestom/blob/master/src/main/java/net/minestom/server/instance/InstanceContainer.java#L240
You need to wait these completable futures (CompletableFuture.allOf might be useful for you here) for the chunks to be loaded.