two small tweaks

This commit is contained in:
Leijurv 2019-01-10 13:50:53 -08:00
parent 1dca02517e
commit 1381d8d94c
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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();