[ci skip] Add more patch identifying comments
This commit is contained in:
@@ -13,12 +13,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
if (l != 0 || n != 0) {
|
||||
pos.set(i + l, j + m, k + n);
|
||||
- BlockState blockState = world.getBlockState(pos);
|
||||
+ // Paper start
|
||||
+ // Paper start - Do not load chunks during pathfinding
|
||||
+ BlockState blockState = world.getBlockStateIfLoaded(pos);
|
||||
+ if (blockState == null) {
|
||||
+ return BlockPathTypes.BLOCKED;
|
||||
+ } else {
|
||||
+ // Paper end
|
||||
+ // Paper end - Do not load chunks during pathfinding
|
||||
if (blockState.is(Blocks.CACTUS) || blockState.is(Blocks.SWEET_BERRY_BUSH)) {
|
||||
return BlockPathTypes.DANGER_OTHER;
|
||||
}
|
||||
@@ -35,8 +35,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
protected static BlockPathTypes getBlockPathTypeRaw(BlockGetter world, BlockPos pos) {
|
||||
- BlockState blockState = world.getBlockState(pos);
|
||||
+ BlockState blockState = world.getBlockStateIfLoaded(pos); // Paper
|
||||
+ if (blockState == null) return BlockPathTypes.BLOCKED; // Paper
|
||||
+ BlockState blockState = world.getBlockStateIfLoaded(pos); // Paper - Do not load chunks during pathfinding
|
||||
+ if (blockState == null) return BlockPathTypes.BLOCKED; // Paper - Do not load chunks during pathfinding
|
||||
Block block = blockState.getBlock();
|
||||
if (blockState.isAir()) {
|
||||
return BlockPathTypes.OPEN;
|
||||
|
||||
Reference in New Issue
Block a user