From a9b956c12d672b112ea635b2ffb98b8f4c7ae4e4 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 5 Feb 2021 21:01:02 -0800 Subject: [PATCH 1/4] empty From 08c00b8a42f0cdd1b2cf5c4e353cd5e811a5baa2 Mon Sep 17 00:00:00 2001 From: Wagyourtail Date: Wed, 3 Nov 2021 13:04:51 -0600 Subject: [PATCH 2/4] surround with try/catch --- .../java/baritone/pathing/movement/MovementHelper.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/pathing/movement/MovementHelper.java b/src/main/java/baritone/pathing/movement/MovementHelper.java index 13c1d4642..134b323f1 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.Vec3d; 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) { From 62fe9888a2096dd245a568464950d7469e0a14f3 Mon Sep 17 00:00:00 2001 From: Wagyourtail Date: Wed, 3 Nov 2021 13:42:29 -0600 Subject: [PATCH 3/4] eclipse dependency updated to java 11 on a minor version --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index c9d71fc29..801dd322b 100755 --- a/build.gradle +++ b/build.gradle @@ -41,7 +41,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' } } From 33943dc4736c734173172b983701e0b82b2a4805 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Wed, 2 Feb 2022 00:24:32 -0800 Subject: [PATCH 4/4] oopsie --- src/main/java/baritone/pathing/movement/MovementHelper.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/baritone/pathing/movement/MovementHelper.java b/src/main/java/baritone/pathing/movement/MovementHelper.java index f1848a907..55957dc7e 100644 --- a/src/main/java/baritone/pathing/movement/MovementHelper.java +++ b/src/main/java/baritone/pathing/movement/MovementHelper.java @@ -550,16 +550,12 @@ public interface MovementHelper extends ActionCosts, Helper { || block instanceof AmethystClusterBlock) { return false; } -<<<<<<< HEAD - return Block.isShapeFullBlock(state.getCollisionShape(null, null)); -======= try { - return Block.isOpaque(state.getCollisionShape(null, null)); + return Block.isShapeFullBlock(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; ->>>>>>> 1.16.4 } static PlaceResult attemptToPlaceABlock(MovementState state, IBaritone baritone, BlockPos placeAt, boolean preferDown, boolean wouldSneak) {