mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
f501069d24
Appear to be used more extensively in 1.14. Subject to further review.
35 lines
No EOL
1.5 KiB
Diff
35 lines
No EOL
1.5 KiB
Diff
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 ba4b9fa59..d3c2ad3c4 100644
|
|
--- 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 int entitydistance;
|
|
private final ChunkMapDistance.b i = new ChunkMapDistance.b(8);
|
|
private final ChunkMapDistance.d j = new ChunkMapDistance.d(33);
|
|
- private final Set<PlayerChunk> k = Sets.newHashSet();
|
|
+ private Set<PlayerChunk> k = Sets.newHashSet(); // Paper - -final
|
|
private final PlayerChunk.c l;
|
|
private final Mailbox<ChunkTaskQueueSorter.a<Runnable>> m;
|
|
private final Mailbox<ChunkTaskQueueSorter.b> n;
|
|
@@ -0,0 +0,0 @@ public abstract class ChunkMapDistance {
|
|
;
|
|
}
|
|
|
|
- if (!this.k.isEmpty()) {
|
|
- this.k.forEach((playerchunk) -> {
|
|
+ // Paper start
|
|
+ Set<PlayerChunk> currentPending = this.k;
|
|
+ this.k = Sets.newHashSet();
|
|
+ if (!currentPending.isEmpty()) {
|
|
+ currentPending.forEach((playerchunk) -> {
|
|
+ // Paper end
|
|
playerchunk.a(playerchunkmap);
|
|
});
|
|
this.k.clear();
|
|
--
|