diff --git a/build.gradle b/build.gradle index 0ad37d913..3c0db2a96 100755 --- a/build.gradle +++ b/build.gradle @@ -44,7 +44,7 @@ buildscript { dependencies { classpath group: 'com.github.ImpactDevelopment', name: 'ForgeGradle', version: '3.0.115' classpath group: 'com.github.ImpactDevelopment', name: 'MixinGradle', version: '0.6.2' - classpath group: 'net.fabricmc', name: 'fabric-loom', version: '0.5-SNAPSHOT' + classpath group: 'net.fabricmc', name: 'fabric-loom', version: '0.7-SNAPSHOT' } } diff --git a/src/main/java/baritone/pathing/movement/MovementHelper.java b/src/main/java/baritone/pathing/movement/MovementHelper.java index 9f9f1d286..b883dcff7 100644 --- a/src/main/java/baritone/pathing/movement/MovementHelper.java +++ b/src/main/java/baritone/pathing/movement/MovementHelper.java @@ -39,6 +39,7 @@ import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.vector.Vector3d; import net.minecraft.world.IBlockReader; +import java.util.List; import java.util.Optional; import static baritone.pathing.movement.Movement.HORIZONTALS_BUT_ALSO_DOWN_____SO_EVERY_DIRECTION_EXCEPT_UP; @@ -522,7 +523,12 @@ public interface MovementHelper extends ActionCosts, Helper { || block instanceof ShulkerBoxBlock) { return false; } - return Block.isOpaque(state.getCollisionShape(null, null)); + try { + return Block.isOpaque(state.getCollisionShape(null, null)); + } catch (Exception ignored) { + // if we can't get the collision shape, assume it's bad and add to blocksToAvoid + } + return false; } static PlaceResult attemptToPlaceABlock(MovementState state, IBaritone baritone, BlockPos placeAt, boolean preferDown, boolean wouldSneak) {