Interface IBaritoneProcess
- All Known Subinterfaces:
IBuilderProcess,ICustomGoalProcess,IElytraProcess,IExploreProcess,IFarmProcess,IFollowProcess,IGetToBlockProcess,IMineProcess
Differences between a baritone process and a behavior:
- Only one baritone process can be active at a time
- PathingBehavior can only be controlled by a process
That's it actually
- Author:
- leijurv
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault StringReturns a user-friendly name for this process.booleanisActive()Would this process like to be in control?booleanReturns whether or not this process should be treated as "temporary".voidCalled ifisActive()returnedtrue, but another non-temporary process has control.onTick(boolean calcFailed, boolean isSafeToCancel) Called when this process is in control of pathing; Returns what Baritone should do.default doublepriority()Used to determine which Process gains control if multiple are reportingisActive().
-
Field Details
-
DEFAULT_PRIORITY
Default priority. Most normal processes should have this value.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.
- See Also:
-
-
Method Details
-
isActive
boolean isActive()Would this process like to be in control?- Returns:
- Whether or not this process would like to be in contorl.
-
onTick
Called when this process is in control of pathing; Returns what Baritone should do.- Parameters:
calcFailed-trueif this specific process was in control last tick, and there was aPathEvent.CALC_FAILEDevent last tickisSafeToCancel-trueif aPathingCommandType.REQUEST_PAUSEwould happen this tick, andIPathingBehaviorwouldn't actually tick.falseif 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"- Returns:
- What the
IPathingBehaviorshould do
-
isTemporary
boolean isTemporary()Returns whether or not this process should be treated as "temporary".If a process is temporary, it doesn't call
onLostControl()on the processes that aren't execute because of it.For example,
CombatPauserProcessandPauseForAutoEatProcessshould returntruealways, and should returnisActive()trueonly if there's something in range this tick, or if the player would like to start eating this tick.PauseForAutoEatProcessshould only actually right click once onTick is called withisSafeToCanceltrue though.- Returns:
- Whether or not if this control is temporary
-
onLostControl
void onLostControl()Called ifisActive()returnedtrue, but another non-temporary process has control. Effectively the same as cancel. You want control but you don't get it. -
priority
Used to determine which Process gains control if multiple are reportingisActive(). The one that returns the highest value will be given control.- Returns:
- A double representing the priority
-
displayName
Returns a user-friendly name for this process. Suitable for a HUD.- Returns:
- A display name that's suitable for a HUD
-
displayName0
-