From 75d7f6aa1662e91a24593022180ba867cbbabca0 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 ed4e8d69ca..cd18150488 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -36,7 +36,7 @@ public abstract class ChunkMapDistance { private final ChunkMapDistance.a e = new ChunkMapDistance.a(); private final ChunkMapDistance.b f = new ChunkMapDistance.b(8); private final ChunkMapDistance.c g = new ChunkMapDistance.c(33); - private final Set h = Sets.newHashSet(); + private Set h = Sets.newHashSet(); // Paper - -final private final PlayerChunk.c i; private final Mailbox> j; private final Mailbox k; @@ -98,8 +98,12 @@ public abstract class ChunkMapDistance { ; } - if (!this.h.isEmpty()) { - this.h.forEach((playerchunk) -> { + // Paper start + Set currentPending = this.h; + this.h = Sets.newHashSet(); + if (!currentPending.isEmpty()) { + currentPending.forEach((playerchunk) -> { + // Paper end playerchunk.a(playerchunkmap); }); this.h.clear(); -- 2.22.0