Skip to content

Commit e42b85c

Browse files
committed
Instead of removing every currently loaded chunk of the world from the players's PlayerChunkSendQueue individually, I could just clear it. It's just a clean up operation anyway, whichs purpose is to help the garbage collector a little bit
1 parent c64ad76 commit e42b85c

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/main/java/net/minecraft/server/PlayerChunkMap.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,14 +267,12 @@ public void removePlayer(EntityPlayer entityplayer) {
267267
PlayerChunk c = (PlayerChunk) i.next();
268268
if(c != null) {
269269
c.b(entityplayer);
270-
ChunkCoordIntPair ccip = PlayerChunk.a(c);
271-
PlayerChunkSendQueue pcsq = entityplayer.chunkQueue;
272-
if(pcsq != null) {
273-
pcsq.removeFromServer(ccip.x, ccip.z);
274-
pcsq.removeFromClient(ccip);
275-
}
276270
}
277271
}
272+
PlayerChunkSendQueue pcsq = entityplayer.chunkQueue;
273+
if(pcsq != null) {
274+
pcsq.clear();
275+
}
278276
entityplayer.setPlayerChunkSendQueue(null);
279277
this.playerChunkManager.removePlayer(entityplayer);
280278
// Poweruser end

0 commit comments

Comments
 (0)