aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0004-MC-Utils.patch
diff options
context:
space:
mode:
authorAikar <[email protected]>2020-05-25 21:42:53 -0400
committerAikar <[email protected]>2020-05-25 21:42:53 -0400
commit21f9efa2cae5eb7259782b9f3d0ddb5d889c4492 (patch)
tree37df4622797298f4d7ccbee45e08bf90086b028a /Spigot-Server-Patches/0004-MC-Utils.patch
parent7ee711460fae3005542ca198a6d8e1b46daed390 (diff)
downloadPaper-21f9efa2cae5eb7259782b9f3d0ddb5d889c4492.tar.gz
Paper-21f9efa2cae5eb7259782b9f3d0ddb5d889c4492.zip
Improve implementation of chunk leak clean to not run as often
Diffstat (limited to 'Spigot-Server-Patches/0004-MC-Utils.patch')
-rw-r--r--Spigot-Server-Patches/0004-MC-Utils.patch31
1 files changed, 28 insertions, 3 deletions
diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch
index 3e3588fea1..6ebbdd83d1 100644
--- a/Spigot-Server-Patches/0004-MC-Utils.patch
+++ b/Spigot-Server-Patches/0004-MC-Utils.patch
@@ -2677,11 +2677,36 @@ index 11c4d23ba988dac5f3fd85142083c77fb603e673..a03e4c5b8693395f4a145ca565b074d6
@Override
public TileEntity getTileEntity(BlockPosition blockposition) {
diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
-index 260644bf0be4c5b2d96033f11382f88231048ce3..f2a19acd84561e746bfc8da0331b5d4055e95327 100644
+index 260644bf0be4c5b2d96033f11382f88231048ce3..5a975f6bc60922ac872ec9c00c9150ce7dcad046 100644
--- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
+++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
-@@ -31,7 +31,9 @@ public class ChunkCoordIntPair {
- return pair(this.x, this.z);
+@@ -11,27 +11,33 @@ public class ChunkCoordIntPair {
+ public static final long a = pair(1875016, 1875016);
+ public final int x;
+ public final int z;
++ public final long longKey; // Paper
+
+ public ChunkCoordIntPair(int i, int j) {
+ this.x = i;
+ this.z = j;
++ this.longKey = pair(this.x, this.z); // Paper
+ }
+
+ public ChunkCoordIntPair(BlockPosition blockposition) {
+ this.x = blockposition.getX() >> 4;
+ this.z = blockposition.getZ() >> 4;
++ this.longKey = pair(this.x, this.z); // Paper
+ }
+
+ public ChunkCoordIntPair(long i) {
+ this.x = (int) i;
+ this.z = (int) (i >> 32);
++ this.longKey = pair(this.x, this.z); // Paper
+ }
+
+ public long pair() {
+- return pair(this.x, this.z);
++ return longKey; // Paper
}
- public static long pair(int i, int j) {