public interface IBaritoneProcess
Differences between a baritone process and a behavior:
That's it actually
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_PRIORITY
Default priority.
|
| Modifier and Type | Method and Description |
|---|---|
default java.lang.String |
displayName()
Returns a user-friendly name for this process.
|
java.lang.String |
displayName0() |
boolean |
isActive()
Would this process like to be in control?
|
boolean |
isTemporary()
Returns whether or not this process should be treated as "temporary".
|
void |
onLostControl()
Called if
isActive() returned true, but another non-temporary
process has control. |
PathingCommand |
onTick(boolean calcFailed,
boolean isSafeToCancel)
Called when this process is in control of pathing; Returns what Baritone should do.
|
default double |
priority()
Used to determine which Process gains control if multiple are reporting
isActive(). |
static final double DEFAULT_PRIORITY
Some examples of processes that should have different values might include some kind of automated mob avoidance that would be temporary and would forcefully take control. Same for something that pauses pathing for auto eat, etc.
The value is -1 beacuse that's what Impact 4.5's beta auto walk returns and I want to tie with it.
boolean isActive()
PathingCommand onTick(boolean calcFailed, boolean isSafeToCancel)
calcFailed - true if this specific process was in control last tick,
and there was a PathEvent.CALC_FAILED event last tickisSafeToCancel - true if a PathingCommandType.REQUEST_PAUSE would happen this tick, and
IPathingBehavior wouldn't actually tick. false if the PathExecutor reported
pausing would be unsafe at the end of the last tick. Effectively "could request cancel or
pause and have it happen right away"IPathingBehavior should doboolean isTemporary()
If a process is temporary, it doesn't call onLostControl() on the processes that aren't execute because of it.
For example, CombatPauserProcess and PauseForAutoEatProcess should return true always,
and should return isActive() true only if there's something in range this tick, or if the player would like
to start eating this tick. PauseForAutoEatProcess should only actually right click once onTick is called with
isSafeToCancel true though.
void onLostControl()
isActive() returned true, but another non-temporary
process has control. Effectively the same as cancel. You want control but you
don't get it.default double priority()
isActive(). The one
that returns the highest value will be given control.default java.lang.String displayName()
java.lang.String displayName0()