Remove extra chunk unloads

This commit is contained in:
Moulberry 2021-09-13 15:08:57 +08:00
parent 9531bd5cb3
commit 5bf4758a3a

View File

@ -561,11 +561,6 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
super.setInstance(instance, spawnPosition);
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();
}