Improve implementation of chunk leak clean to not run as often
This commit is contained in:
@@ -2681,7 +2681,32 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkCoordIntPair {
|
||||
return pair(this.x, this.z);
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user