From c9ebde9228cf948c411658c987ddeced08df3cb8 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 29 May 2019 04:01:22 +0100 Subject: [PATCH] ChunkMapDistance CME diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java index ba4b9fa59..d3c2ad3c4 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -39,7 +39,7 @@ public abstract class ChunkMapDistance { private int entitydistance; private final ChunkMapDistance.b i = new ChunkMapDistance.b(8); private final ChunkMapDistance.d j = new ChunkMapDistance.d(33); - private final Set k = Sets.newHashSet(); + private Set k = Sets.newHashSet(); // Paper - -final private final PlayerChunk.c l; private final Mailbox> m; private final Mailbox n; @@ -117,8 +117,12 @@ public abstract class ChunkMapDistance { ; } - if (!this.k.isEmpty()) { - this.k.forEach((playerchunk) -> { + // Paper start + Set currentPending = this.k; + this.k = Sets.newHashSet(); + if (!currentPending.isEmpty()) { + currentPending.forEach((playerchunk) -> { + // Paper end playerchunk.a(playerchunkmap); }); this.k.clear(); -- 2.21.0