From 1381d8d94c07629c807c76e8e238522b1638b458 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 10 Jan 2019 13:50:53 -0800 Subject: [PATCH] two small tweaks --- .../baritone/pathing/movement/movements/MovementPillar.java | 3 +++ src/main/java/baritone/utils/PathingControlManager.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/pathing/movement/movements/MovementPillar.java b/src/main/java/baritone/pathing/movement/movements/MovementPillar.java index 18a248c1..92ac6cbe 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementPillar.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementPillar.java @@ -82,6 +82,9 @@ public class MovementPillar extends Movement { if (placeCost >= COST_INF) { return COST_INF; } + if (fromDown.getBlock() == Blocks.AIR) { + placeCost += 0.1; // slightly (1/200th of a second) penalize pillaring on what's currently air + } } if (from instanceof BlockLiquid || (fromDown.getBlock() instanceof BlockLiquid && context.assumeWalkOnWater)) { // otherwise, if we're standing in water, we cannot pillar diff --git a/src/main/java/baritone/utils/PathingControlManager.java b/src/main/java/baritone/utils/PathingControlManager.java index 1368658b..d9879088 100644 --- a/src/main/java/baritone/utils/PathingControlManager.java +++ b/src/main/java/baritone/utils/PathingControlManager.java @@ -82,11 +82,12 @@ public class PathingControlManager implements IPathingControlManager { public void preTick() { inControlLastTick = inControlThisTick; + PathingBehavior p = baritone.getPathingBehavior(); command = doTheStuff(); if (command == null) { + p.cancelSegmentIfSafe(); return; } - PathingBehavior p = baritone.getPathingBehavior(); switch (command.commandType) { case REQUEST_PAUSE: p.requestPause();