13
0
geforkt von Mirrors/Paper
Paper/Spigot-Server-Patches/ChunkMapDistance-CME.patch

35 Zeilen
1.5 KiB
Diff

2019-05-29 05:25:08 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
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
2019-05-29 05:25:08 +02:00
--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java
+++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java
@@ -0,0 +0,0 @@ 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<PlayerChunk> h = Sets.newHashSet();
+ private Set<PlayerChunk> h = Sets.newHashSet(); // Paper - -final
private final PlayerChunk.c i;
private final Mailbox<ChunkTaskQueueSorter.a<Runnable>> j;
private final Mailbox<ChunkTaskQueueSorter.b> k;
2019-05-29 05:25:08 +02:00
@@ -0,0 +0,0 @@ public abstract class ChunkMapDistance {
;
}
- if (!this.h.isEmpty()) {
- this.h.forEach((playerchunk) -> {
2019-05-29 05:25:08 +02:00
+ // Paper start
+ Set<PlayerChunk> currentPending = this.h;
+ this.h = Sets.newHashSet();
2019-05-29 05:25:08 +02:00
+ if (!currentPending.isEmpty()) {
+ currentPending.forEach((playerchunk) -> {
+ // Paper end
playerchunk.a(playerchunkmap);
});
this.h.clear();
2019-05-29 05:25:08 +02:00
--