Also override heuristic(no args) when overriding isInGoal()

This commit is contained in:
ZacSharp 2020-09-20 22:39:48 +02:00
parent 85cc86346c
commit aebfbba20e
No known key found for this signature in database
GPG Key ID: 9453647B005083A3
2 changed files with 8 additions and 0 deletions

View File

@ -77,6 +77,10 @@ public final class GetToBlockProcess extends BaritoneProcessHelper implements IG
public boolean isInGoal(int x, int y, int z) {
return false;
}
@Override
public double heuristic() {
return Double.NEGATIVE_INFINITY;
}
}, PathingCommandType.FORCE_REVALIDATE_GOAL_AND_PATH);
}
logDirect("No known locations of " + gettingTo + ", canceling GetToBlock");

View File

@ -211,6 +211,10 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
public boolean isInGoal(int x, int y, int z) {
return false;
}
@Override
public double heuristic() {
return Double.NEGATIVE_INFINITY;
}
};
}
return new PathingCommand(branchPointRunaway, PathingCommandType.REVALIDATE_GOAL_AND_PATH);