can walk through should be cached as air, fixes #124

This commit is contained in:
Leijurv 2018-09-02 14:10:27 -07:00
parent da5460413c
commit c63ccc3dcb
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -21,6 +21,9 @@ import baritone.pathing.movement.MovementHelper;
import baritone.utils.Helper;
import baritone.utils.pathing.PathingBlockType;
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.init.Blocks;
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
// 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
if (block == Blocks.AIR) {
if (block == Blocks.AIR || block instanceof BlockTallGrass || block instanceof BlockDoublePlant || block instanceof BlockFlower) {
return PathingBlockType.AIR;
}