PaperMC/Spigot-Server-Patches/0113-Do-not-load-chunks-for-pathfinding.patch
2018-07-23 09:44:57 +01:00

22 lines
826 B
Diff

From bc7a01c2d7b9be7bfabb73c3ead9364433e5fee1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Jan 2016 00:13:19 -0500
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 6d153e4311..07444a86ac 100644
--- a/src/main/java/net/minecraft/server/ChunkCache.java
+++ b/src/main/java/net/minecraft/server/ChunkCache.java
@@ -27,7 +27,7 @@ public class ChunkCache implements IIBlockAccess {
for (l = this.a; l <= j; ++l) {
for (i1 = this.b; i1 <= k; ++i1) {
- this.c[l - this.a][i1 - this.b] = world.getChunkAt(l, i1);
+ this.c[l - this.a][i1 - this.b] = world.getChunkIfLoaded(l, i1); // Paper
}
}
--
2.18.0