no more allowVines crash
This commit is contained in:
parent
0b2bab6549
commit
ce2fc6f251
@ -195,7 +195,7 @@ public class MovementPillar extends Movement {
|
|||||||
if (ladder) {
|
if (ladder) {
|
||||||
BlockPos against = vine ? getAgainst(new CalculationContext(baritone), src) : src.offset(fromDown.getValue(BlockLadder.FACING).getOpposite());
|
BlockPos against = vine ? getAgainst(new CalculationContext(baritone), src) : src.offset(fromDown.getValue(BlockLadder.FACING).getOpposite());
|
||||||
if (against == null) {
|
if (against == null) {
|
||||||
logDebug("Unable to climb vines");
|
logDirect("Unable to climb vines. Consider disabling allowVines.");
|
||||||
return state.setStatus(MovementStatus.UNREACHABLE);
|
return state.setStatus(MovementStatus.UNREACHABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,6 +261,10 @@ public class MovementTraverse extends Movement {
|
|||||||
BlockPos against = positionsToBreak[0];
|
BlockPos against = positionsToBreak[0];
|
||||||
if (feet.getY() != dest.getY() && ladder && (destDown.getBlock() == Blocks.VINE || destDown.getBlock() == Blocks.LADDER)) {
|
if (feet.getY() != dest.getY() && ladder && (destDown.getBlock() == Blocks.VINE || destDown.getBlock() == Blocks.LADDER)) {
|
||||||
against = destDown.getBlock() == Blocks.VINE ? MovementPillar.getAgainst(new CalculationContext(baritone), dest.down()) : dest.offset(destDown.getValue(BlockLadder.FACING).getOpposite());
|
against = destDown.getBlock() == Blocks.VINE ? MovementPillar.getAgainst(new CalculationContext(baritone), dest.down()) : dest.offset(destDown.getValue(BlockLadder.FACING).getOpposite());
|
||||||
|
if (against == null) {
|
||||||
|
logDirect("Unable to climb vines. Consider disabling allowVines.");
|
||||||
|
return state.setStatus(MovementStatus.UNREACHABLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
MovementHelper.moveTowards(ctx, state, against);
|
MovementHelper.moveTowards(ctx, state, against);
|
||||||
return state;
|
return state;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user