aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0326-Add-debug-for-sync-chunk-loads.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0326-Add-debug-for-sync-chunk-loads.patch')
-rw-r--r--patches/server/0326-Add-debug-for-sync-chunk-loads.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/patches/server/0326-Add-debug-for-sync-chunk-loads.patch b/patches/server/0326-Add-debug-for-sync-chunk-loads.patch
index d7143dad9f..6862d9fe5b 100644
--- a/patches/server/0326-Add-debug-for-sync-chunk-loads.patch
+++ b/patches/server/0326-Add-debug-for-sync-chunk-loads.patch
@@ -14,7 +14,7 @@ chunks, however it must be enabled by setting the startup flag
diff --git a/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
new file mode 100644
-index 0000000000000000000000000000000000000000..0bb4aaa546939b67a5d22865190f30478a9337c1
+index 0000000000000000000000000000000000000000..404a8fd128043527d23f22ee26f7c8c739f09089
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
@@ -0,0 +1,175 @@
@@ -69,7 +69,7 @@ index 0000000000000000000000000000000000000000..0bb4aaa546939b67a5d22865190f3047
+
+ ++valueInMap.times;
+
-+ valueInMap.coordinateTimes.compute(IOUtil.getCoordinateKey(chunkX, chunkZ), (Long keyInMap1, Integer valueInMap1) -> {
++ valueInMap.coordinateTimes.compute(io.papermc.paper.util.MCUtil.getCoordinateKey(chunkX, chunkZ), (Long keyInMap1, Integer valueInMap1) -> {
+ return valueInMap1 == null ? Integer.valueOf(1) : Integer.valueOf(valueInMap1.intValue() + 1);
+ });
+
@@ -122,7 +122,7 @@ index 0000000000000000000000000000000000000000..0bb4aaa546939b67a5d22865190f3047
+ for (Long2IntMap.Entry coordinate : pair.getSecond().coordinateTimes.long2IntEntrySet()) {
+ final long key = coordinate.getLongKey();
+ final int times = coordinate.getIntValue();
-+ coordinates.add("(" + IOUtil.getCoordinateX(key) + "," + IOUtil.getCoordinateZ(key) + "): " + times);
++ coordinates.add("(" + io.papermc.paper.util.MCUtil.getCoordinateX(key) + "," + io.papermc.paper.util.MCUtil.getCoordinateZ(key) + "): " + times);
+ }
+
+ stacktrace.add("coordinates", coordinates);
@@ -300,10 +300,10 @@ index 0000000000000000000000000000000000000000..95d6022c9cfb2e36ec5a71be6e343540
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-index 32a26eac53cfd4fb69ba117908acc82894deb1a0..6bb0b24e8bc5cd031d192dd0b61a3afd248c62e4 100644
+index 326b67c15ee3df162bf4468729c49dd98b582f02..8a118a7b2878d3c99dadfa97e2ae58fda2b3f93b 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-@@ -424,6 +424,7 @@ public class ServerChunkCache extends ChunkSource {
+@@ -282,6 +282,7 @@ public class ServerChunkCache extends ChunkSource {
Objects.requireNonNull(completablefuture);
if (!completablefuture.isDone()) { // Paper
@@ -312,7 +312,7 @@ index 32a26eac53cfd4fb69ba117908acc82894deb1a0..6bb0b24e8bc5cd031d192dd0b61a3afd
chunkproviderserver_b.managedBlock(completablefuture::isDone);
this.level.timings.syncChunkLoad.stopTiming(); // Paper
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 989cd53db579408f89c3425d808e0a611194e896..dd7071404555548c7f102737456f8773860b597b 100644
+index 3f70bab49d58ec36f6153a7dae577d22c90d2918..14958ce7c7cb1a55da6b6dd6c32a32c9346e866b 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -415,6 +415,13 @@ public class ServerLevel extends Level implements WorldGenLevel {