can walk through should be cached as air, fixes #124
This commit is contained in:
@@ -21,6 +21,9 @@ import baritone.pathing.movement.MovementHelper;
|
|||||||
import baritone.utils.Helper;
|
import baritone.utils.Helper;
|
||||||
import baritone.utils.pathing.PathingBlockType;
|
import baritone.utils.pathing.PathingBlockType;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockDoublePlant;
|
||||||
|
import net.minecraft.block.BlockFlower;
|
||||||
|
import net.minecraft.block.BlockTallGrass;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
@@ -113,7 +116,7 @@ public final class ChunkPacker implements Helper {
|
|||||||
// however, this failed in the nether when you were near a nether fortress
|
// however, this failed in the nether when you were near a nether fortress
|
||||||
// because fences check their adjacent blocks in the world for their fence connection status to determine AABB shape
|
// because fences check their adjacent blocks in the world for their fence connection status to determine AABB shape
|
||||||
// this caused a nullpointerexception when we saved chunks on unload, because they were unable to check their neighbors
|
// this caused a nullpointerexception when we saved chunks on unload, because they were unable to check their neighbors
|
||||||
if (block == Blocks.AIR) {
|
if (block == Blocks.AIR || block instanceof BlockTallGrass || block instanceof BlockDoublePlant || block instanceof BlockFlower) {
|
||||||
return PathingBlockType.AIR;
|
return PathingBlockType.AIR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user