aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0315-Add-debug-for-sync-chunk-loads.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0315-Add-debug-for-sync-chunk-loads.patch')
-rw-r--r--patches/server/0315-Add-debug-for-sync-chunk-loads.patch10
1 files changed, 6 insertions, 4 deletions
diff --git a/patches/server/0315-Add-debug-for-sync-chunk-loads.patch b/patches/server/0315-Add-debug-for-sync-chunk-loads.patch
index e995b41d89..bf5532d58e 100644
--- a/patches/server/0315-Add-debug-for-sync-chunk-loads.patch
+++ b/patches/server/0315-Add-debug-for-sync-chunk-loads.patch
@@ -14,10 +14,10 @@ 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..404a8fd128043527d23f22ee26f7c8c739f09089
+index 0000000000000000000000000000000000000000..605a4a83d0a098a9977da00c710e798396dc5256
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
-@@ -0,0 +1,175 @@
+@@ -0,0 +1,177 @@
+package com.destroystokyo.paper.io;
+
+import com.google.gson.JsonArray;
@@ -31,6 +31,7 @@ index 0000000000000000000000000000000000000000..404a8fd128043527d23f22ee26f7c8c7
+import java.util.List;
+import java.util.Map;
+import java.util.WeakHashMap;
++import net.minecraft.world.level.ChunkPos;
+import net.minecraft.world.level.Level;
+
+public class SyncLoadFinder {
@@ -69,7 +70,7 @@ index 0000000000000000000000000000000000000000..404a8fd128043527d23f22ee26f7c8c7
+
+ ++valueInMap.times;
+
-+ valueInMap.coordinateTimes.compute(io.papermc.paper.util.MCUtil.getCoordinateKey(chunkX, chunkZ), (Long keyInMap1, Integer valueInMap1) -> {
++ valueInMap.coordinateTimes.compute(ChunkPos.asLong(chunkX, chunkZ), (Long keyInMap1, Integer valueInMap1) -> {
+ return valueInMap1 == null ? Integer.valueOf(1) : Integer.valueOf(valueInMap1.intValue() + 1);
+ });
+
@@ -122,7 +123,8 @@ index 0000000000000000000000000000000000000000..404a8fd128043527d23f22ee26f7c8c7
+ for (Long2IntMap.Entry coordinate : pair.getSecond().coordinateTimes.long2IntEntrySet()) {
+ final long key = coordinate.getLongKey();
+ final int times = coordinate.getIntValue();
-+ coordinates.add("(" + io.papermc.paper.util.MCUtil.getCoordinateX(key) + "," + io.papermc.paper.util.MCUtil.getCoordinateZ(key) + "): " + times);
++ final ChunkPos chunkPos = new ChunkPos(key);
++ coordinates.add("(" + chunkPos.x + "," + chunkPos.z + "): " + times);
+ }
+
+ stacktrace.add("coordinates", coordinates);