aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0128-Do-not-load-chunks-for-pathfinding.patch
blob: cebfc4185604a3c712d8bec4d375688093d20b7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From 0e544cd8d1e8174c68a97013f8898d58741d0340 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 08b986fd7..786d1dd22 100644
--- a/src/main/java/net/minecraft/server/ChunkCache.java
+++ b/src/main/java/net/minecraft/server/ChunkCache.java
@@ -25,7 +25,7 @@ public class ChunkCache implements IBlockAccess {
 
         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.12.2.windows.2