Class PathingBehavior

java.lang.Object
com.zenith.feature.pathfinder.behavior.Behavior
com.zenith.feature.pathfinder.behavior.PathingBehavior

public class PathingBehavior extends Behavior
  • Constructor Details

    • PathingBehavior

      public PathingBehavior(Baritone baritone)
  • Method Details

    • onClientBotTickStateChange

      public void onClientBotTickStateChange()
    • onTick

      public void onTick()
    • secretInternalSetGoal

      public void secretInternalSetGoal(Goal goal)
    • secretInternalSetGoalAndPath

      public boolean secretInternalSetGoalAndPath(PathingCommand command)
    • isPathing

      public boolean isPathing()
    • getInProgress

      public Optional<AbstractNodeCostSearch> getInProgress()
    • isSafeToCancel

      public boolean isSafeToCancel()
    • requestPause

      public void requestPause()
    • cancelSegmentIfSafe

      public boolean cancelSegmentIfSafe()
    • cancelEverything

      public boolean cancelEverything()
    • calcFailedLastTick

      public boolean calcFailedLastTick()
    • softCancelIfSafe

      public void softCancelIfSafe()
    • secretInternalSegmentCancel

      public void secretInternalSegmentCancel()
    • forceCancel

      public void forceCancel()
    • secretInternalGetCalculationContext

      public CalculationContext secretInternalGetCalculationContext()
    • estimatedTicksToGoal

      public Optional<Double> estimatedTicksToGoal()
    • pathStart

      public BlockPos pathStart()
      See issue #209
      Returns:
      The starting BlockPos for a new path
    • ticksRemainingInSegment

      public Optional<Double> ticksRemainingInSegment()
      Returns the estimated remaining ticks in the current pathing segment. Given that the return type is an optional, Optional.empty() will be returned in the case that there is no current segment being pathed.
      Returns:
      The estimated remaining ticks in the current segment.
    • ticksRemainingInSegment

      public Optional<Double> ticksRemainingInSegment(boolean includeCurrentMovement)
      Returns the estimated remaining ticks in the current pathing segment. Given that the return type is an optional, Optional.empty() will be returned in the case that there is no current segment being pathed.
      Parameters:
      includeCurrentMovement - whether or not to include the entirety of the cost of the currently executing movement in the total
      Returns:
      The estimated remaining ticks in the current segment.
    • getPath

      public Optional<IPath> getPath()
    • hasPath

      public boolean hasPath()
      Returns:
      If there is a current path. Note that the path is not necessarily being executed, for example when there is a pause in effect.
      See Also:
    • getCurrent

      public PathExecutor getCurrent()
    • getNext

      public PathExecutor getNext()
    • getGoal

      public Goal getGoal()
    • getContext

      public CalculationContext getContext()
    • getTicksElapsedSoFar

      public int getTicksElapsedSoFar()
    • getStartPosition

      public BlockPos getStartPosition()
    • isPauseRequestedLastTick

      public boolean isPauseRequestedLastTick()
    • isUnpausedLastTick

      public boolean isUnpausedLastTick()
    • isPausedThisTick

      public boolean isPausedThisTick()
    • isCancelRequested

      public boolean isCancelRequested()
    • isCalcFailedLastTick

      public boolean isCalcFailedLastTick()
    • getPathCalcLock

      public Object getPathCalcLock()
    • getPathPlanLock

      public Object getPathPlanLock()
    • getPathSearchFuture

      public @Nullable com.google.common.util.concurrent.ListenableFuture<?> getPathSearchFuture()
    • isLastAutoJump

      public boolean isLastAutoJump()
    • getExpectedSegmentStart

      public BlockPos getExpectedSegmentStart()
    • getToDispatch

      public LinkedBlockingQueue<PathEvent> getToDispatch()
    • getLastFailedPathTime

      public long getLastFailedPathTime()
    • getFailedPathSearches

      public AtomicInteger getFailedPathSearches()