mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-15 14:13:56 +01:00
Do not load chunks for pathfinding
This commit is contained in:
parent
3da6be053f
commit
7947dd83ae
2 changed files with 21 additions and 0 deletions
|
@ -0,0 +1,20 @@
|
||||||
|
From 0000000000000000000000000000000000000000 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 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 {
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
|
@ -43,6 +43,7 @@ import BlockFurnace
|
||||||
import BlockIceFrost
|
import BlockIceFrost
|
||||||
import BlockPosition
|
import BlockPosition
|
||||||
import BlockStateList
|
import BlockStateList
|
||||||
|
import ChunkCache
|
||||||
import ChunkProviderFlat
|
import ChunkProviderFlat
|
||||||
import ChunkProviderGenerate
|
import ChunkProviderGenerate
|
||||||
import ChunkProviderHell
|
import ChunkProviderHell
|
||||||
|
|
Loading…
Reference in a new issue