From 462ac1b03a4fb5b2c55202e5de4be9d543398c94 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sun, 12 Aug 2018 08:24:53 -0700 Subject: [PATCH] i literally hate magma --- .../bot/pathing/movement/movements/MovementDiagonal.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/baritone/bot/pathing/movement/movements/MovementDiagonal.java b/src/main/java/baritone/bot/pathing/movement/movements/MovementDiagonal.java index 94af0f6c..1f140d80 100644 --- a/src/main/java/baritone/bot/pathing/movement/movements/MovementDiagonal.java +++ b/src/main/java/baritone/bot/pathing/movement/movements/MovementDiagonal.java @@ -22,6 +22,7 @@ import baritone.bot.pathing.movement.Movement; import baritone.bot.pathing.movement.MovementHelper; import baritone.bot.pathing.movement.MovementState; import baritone.bot.utils.BlockStateInterface; +import net.minecraft.block.BlockMagma; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; @@ -76,6 +77,12 @@ public class MovementDiagonal extends Movement { if (!MovementHelper.canWalkOn(positionsToPlace[0])) { return COST_INF; } + if (BlockStateInterface.get(positionsToBreak[2].down()).getBlock() instanceof BlockMagma) { + return COST_INF; + } + if (BlockStateInterface.get(positionsToBreak[4].down()).getBlock() instanceof BlockMagma) { + return COST_INF; + } double optionA = MovementHelper.getMiningDurationTicks(context.getToolSet(), positionsToBreak[0]) + MovementHelper.getMiningDurationTicks(context.getToolSet(), positionsToBreak[1]); double optionB = MovementHelper.getMiningDurationTicks(context.getToolSet(), positionsToBreak[2]) + MovementHelper.getMiningDurationTicks(context.getToolSet(), positionsToBreak[3]); if (optionA != 0 && optionB != 0) {