--- a/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
+++ b/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
@@ -480,7 +_,12 @@
     }
 
     protected static PathType getPathTypeFromState(BlockGetter level, BlockPos pos) {
-        BlockState blockState = level.getBlockState(pos);
+        // Paper start - Do not load chunks during pathfinding
+        BlockState blockState = level.getBlockStateIfLoaded(pos);
+        if (blockState == null) {
+            return PathType.BLOCKED;
+        }
+        // Paper end
         Block block = blockState.getBlock();
         if (blockState.isAir()) {
             return PathType.OPEN;
