diff options
Diffstat (limited to 'patches/server/0082-Do-not-load-chunks-for-Pathfinding.patch')
-rw-r--r-- | patches/server/0082-Do-not-load-chunks-for-Pathfinding.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/server/0082-Do-not-load-chunks-for-Pathfinding.patch b/patches/server/0082-Do-not-load-chunks-for-Pathfinding.patch new file mode 100644 index 0000000000..76cfe02b0f --- /dev/null +++ b/patches/server/0082-Do-not-load-chunks-for-Pathfinding.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +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/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java +index 6a8f44600a426041e3974aa52bdec0cc35e26591..d5004290e40a1ff5e0fcfe75f8da34ae15962359 100644 +--- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java ++++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java +@@ -478,7 +478,12 @@ public class WalkNodeEvaluator extends NodeEvaluator { + } + + protected static PathType getPathTypeFromState(BlockGetter world, BlockPos pos) { +- BlockState blockState = world.getBlockState(pos); ++ // Paper start - Do not load chunks during pathfinding ++ BlockState blockState = world.getBlockStateIfLoaded(pos); ++ if (blockState == null) { ++ return PathType.BLOCKED; ++ } ++ // Paper end + Block block = blockState.getBlock(); + if (blockState.isAir()) { + return PathType.OPEN; |