Fix ChunkCache .getXIfLoaded to use the local chunks in the cache
It was calling back out to world for it, we already have them. Also use the nocache method for building the chunk cache too.
This commit is contained in:
@@ -4,19 +4,6 @@ Date: Thu, 31 Mar 2016 19:17:58 -0400
|
||||
Subject: [PATCH] Do not load chunks for Pathfinding
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkCache.java b/src/main/java/net/minecraft/server/ChunkCache.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkCache.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess {
|
||||
|
||||
for (k = this.a; k <= i; ++k) {
|
||||
for (l = this.b; l <= j; ++l) {
|
||||
- this.c[k - this.a][l - this.b] = ichunkprovider.a(k, l);
|
||||
+ this.c[k - this.a][l - this.b] = world.getChunkIfLoadedImmediately(k, l); // Paper
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
|
||||
Reference in New Issue
Block a user