mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-02 14:38:26 +01:00
Remove extra chunk unloads
This commit is contained in:
parent
9531bd5cb3
commit
5bf4758a3a
@ -561,11 +561,6 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
|||||||
super.setInstance(instance, spawnPosition);
|
super.setInstance(instance, spawnPosition);
|
||||||
|
|
||||||
if (updateChunks) {
|
if (updateChunks) {
|
||||||
// Warning: loop to remove once `refreshVisibleChunks` manage it
|
|
||||||
if(!dimensionChange) { //The client already forcefully unloads all chunks & entities when the dimension changes
|
|
||||||
previousChunks.forEach(chunk ->
|
|
||||||
playerConnection.sendPacket(new UnloadChunkPacket(chunk.getChunkX(), chunk.getChunkZ())));
|
|
||||||
}
|
|
||||||
refreshVisibleChunks();
|
refreshVisibleChunks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user