Cleanup ChunkMapDistance patch
This commit is contained in:
parent
276afaa2ea
commit
c8bc57c719
3 changed files with 13 additions and 21 deletions
|
@ -1,31 +1,23 @@
|
||||||
From 4edf0cf5fcd69d7b5fc89c185144706f2de35667 Mon Sep 17 00:00:00 2001
|
From 1766a8a8d59788875641888455fa5e44b0e1aaf3 Mon Sep 17 00:00:00 2001
|
||||||
From: Shane Freeder <theboyetronic@gmail.com>
|
From: Shane Freeder <theboyetronic@gmail.com>
|
||||||
Date: Wed, 29 May 2019 04:01:22 +0100
|
Date: Wed, 29 May 2019 04:01:22 +0100
|
||||||
Subject: [PATCH] ChunkMapDistance CME
|
Subject: [PATCH] ChunkMapDistance CME
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||||
index ed4e8d69ca..f72843119a 100644
|
index ed4e8d69ca..a116826490 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
+++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||||
@@ -23,6 +23,7 @@ import it.unimi.dsi.fastutil.objects.ObjectSortedSet;
|
@@ -36,7 +36,7 @@ public abstract class ChunkMapDistance {
|
||||||
import java.util.Set;
|
|
||||||
import java.util.concurrent.CompletableFuture;
|
|
||||||
import java.util.concurrent.Executor;
|
|
||||||
+
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
|
||||||
import org.apache.logging.log4j.Logger;
|
|
||||||
@@ -36,7 +37,7 @@ public abstract class ChunkMapDistance {
|
|
||||||
private final ChunkMapDistance.a e = new ChunkMapDistance.a();
|
private final ChunkMapDistance.a e = new ChunkMapDistance.a();
|
||||||
private final ChunkMapDistance.b f = new ChunkMapDistance.b(8);
|
private final ChunkMapDistance.b f = new ChunkMapDistance.b(8);
|
||||||
private final ChunkMapDistance.c g = new ChunkMapDistance.c(33);
|
private final ChunkMapDistance.c g = new ChunkMapDistance.c(33);
|
||||||
- private final Set<PlayerChunk> h = Sets.newHashSet();
|
- private final Set<PlayerChunk> h = Sets.newHashSet();
|
||||||
+ private java.util.Queue<PlayerChunk> h = new java.util.LinkedList<>(); // Paper - -final
|
+ private final java.util.Queue<PlayerChunk> h = new java.util.LinkedList<>(); // Paper - use a queue
|
||||||
private final PlayerChunk.c i;
|
private final PlayerChunk.c i;
|
||||||
private final Mailbox<ChunkTaskQueueSorter.a<Runnable>> j;
|
private final Mailbox<ChunkTaskQueueSorter.a<Runnable>> j;
|
||||||
private final Mailbox<ChunkTaskQueueSorter.b> k;
|
private final Mailbox<ChunkTaskQueueSorter.b> k;
|
||||||
@@ -98,11 +99,12 @@ public abstract class ChunkMapDistance {
|
@@ -98,11 +98,12 @@ public abstract class ChunkMapDistance {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From cf96fbf8f2765c7b40b3bf5d75e747af5d91d0f4 Mon Sep 17 00:00:00 2001
|
From 127dfaac68fcbeb0374f740c81f81c713a147cf1 Mon Sep 17 00:00:00 2001
|
||||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||||
Date: Sat, 1 Jun 2019 13:00:55 -0700
|
Date: Sat, 1 Jun 2019 13:00:55 -0700
|
||||||
Subject: [PATCH] Chunk debug command
|
Subject: [PATCH] Chunk debug command
|
||||||
|
@ -185,10 +185,10 @@ index 391726d99c..8db92edc36 100644
|
||||||
* Ported from MinecraftForge - author: LexManos <LexManos@gmail.com> - License: LGPLv2.1
|
* Ported from MinecraftForge - author: LexManos <LexManos@gmail.com> - License: LGPLv2.1
|
||||||
*/
|
*/
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||||
index f72843119a..c1fdd7b7a4 100644
|
index a116826490..f51bda68a8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
+++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||||
@@ -33,7 +33,7 @@ public abstract class ChunkMapDistance {
|
@@ -32,7 +32,7 @@ public abstract class ChunkMapDistance {
|
||||||
private static final Logger LOGGER = LogManager.getLogger();
|
private static final Logger LOGGER = LogManager.getLogger();
|
||||||
private static final int b = 33 + ChunkStatus.a(ChunkStatus.FULL) - 2;
|
private static final int b = 33 + ChunkStatus.a(ChunkStatus.FULL) - 2;
|
||||||
private final Long2ObjectMap<ObjectSet<EntityPlayer>> c = new Long2ObjectOpenHashMap();
|
private final Long2ObjectMap<ObjectSet<EntityPlayer>> c = new Long2ObjectOpenHashMap();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From d1f7563e1c33a5892e42263f6f79bbef7ff52840 Mon Sep 17 00:00:00 2001
|
From 3e1658a1def891bc65cfbe2bd636ef84dca1cacd Mon Sep 17 00:00:00 2001
|
||||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||||
Date: Sun, 16 Jun 2019 23:30:25 -0700
|
Date: Sun, 16 Jun 2019 23:30:25 -0700
|
||||||
Subject: [PATCH] Fix MC-154214
|
Subject: [PATCH] Fix MC-154214
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix MC-154214
|
||||||
Avoid adding player tickets when they're out of range of the closest player
|
Avoid adding player tickets when they're out of range of the closest player
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||||
index c1fdd7b7a4..1a6fe87cd8 100644
|
index f51bda68a8..9bb711a9db 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
+++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||||
@@ -331,12 +331,18 @@ public abstract class ChunkMapDistance {
|
@@ -330,12 +330,18 @@ public abstract class ChunkMapDistance {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void a(long i, int j, boolean flag, boolean flag1) {
|
private void a(long i, int j, boolean flag, boolean flag1) {
|
||||||
|
@ -28,7 +28,7 @@ index c1fdd7b7a4..1a6fe87cd8 100644
|
||||||
ChunkMapDistance.this.a(i, ticket);
|
ChunkMapDistance.this.a(i, ticket);
|
||||||
ChunkMapDistance.this.l.add(i);
|
ChunkMapDistance.this.l.add(i);
|
||||||
});
|
});
|
||||||
@@ -380,6 +386,7 @@ public abstract class ChunkMapDistance {
|
@@ -379,6 +385,7 @@ public abstract class ChunkMapDistance {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ index c1fdd7b7a4..1a6fe87cd8 100644
|
||||||
private boolean c(int i) {
|
private boolean c(int i) {
|
||||||
return i <= this.e - 2;
|
return i <= this.e - 2;
|
||||||
}
|
}
|
||||||
@@ -387,7 +394,7 @@ public abstract class ChunkMapDistance {
|
@@ -386,7 +393,7 @@ public abstract class ChunkMapDistance {
|
||||||
|
|
||||||
class b extends ChunkMap {
|
class b extends ChunkMap {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue