Improve Structures Checking
Improves performance by keying every chunk thats part of a structure to a hashmap instead of only the first one. This allows us to avoid iterating the entire structures value set to see if a block position is inside of a structure. This should have pretty decent performance improvement to any standard world that has been around for a whilewith lots of structures due to ineffeciencies in how MC stores structures (even unloaded chunks has structured data loaded)
This commit is contained in:
@@ -4,18 +4,6 @@ Date: Wed, 9 Aug 2017 17:51:22 -0500
|
||||
Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||
index 239440888..e8d1a1c60 100644
|
||||
--- 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 {
|
||||
this.z = blockposition.getZ() >> 4;
|
||||
}
|
||||
|
||||
+ public static long asLong(int x, int z) { return a(x, z); } // Paper - OBFHELPER
|
||||
public static long a(int i, int j) {
|
||||
return (long) i & 4294967295L | ((long) j & 4294967295L) << 32;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 30cf4a251..f690aaa10 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
|
||||
Reference in New Issue
Block a user