Even more cleanup of mcutil patch
This commit is contained in:
parent
3c8a7fe1a4
commit
a8db527449
59 changed files with 282 additions and 1154 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue