only offset down if doing so would put us on solid ground

This commit is contained in:
Leijurv 2018-09-02 09:22:51 -07:00
parent 1f97daf391
commit 3afd836822
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -27,6 +27,7 @@ import baritone.pathing.calc.AStarPathFinder;
import baritone.pathing.calc.AbstractNodeCostSearch;
import baritone.pathing.calc.IPathFinder;
import baritone.pathing.goals.*;
import baritone.pathing.movement.MovementHelper;
import baritone.pathing.path.IPath;
import baritone.pathing.path.PathExecutor;
import baritone.utils.BlockStateInterface;
@ -226,7 +227,7 @@ public class PathingBehavior extends Behavior {
public BlockPos pathStart() {
BlockPos feet = playerFeet();
if (BlockStateInterface.get(feet.down()).getBlock().equals(Blocks.AIR)) {
if (BlockStateInterface.get(feet.down()).getBlock().equals(Blocks.AIR) && MovementHelper.canWalkOn(feet.down().down())) {
return feet.down();
}
return feet;