Class BodyMotionFindBase<T extends AStarBase>

All Implemented Interfaces:
BodyMotion, Motion, RoleStateChange, AStarEvaluator, IAnnotatedComponent
Direct Known Subclasses:
BodyMotionFindWithTarget, BodyMotionLeave

public abstract class BodyMotionFindBase<T extends AStarBase> extends BodyMotionBase implements AStarEvaluator
  • Field Details

    • nodesPerTick

      protected final int nodesPerTick
    • useBestPath

      protected final boolean useBestPath
    • throttleDelayMin

      protected final double throttleDelayMin
    • throttleDelayMax

      protected final double throttleDelayMax
    • throttleIgnoreCount

      protected final int throttleIgnoreCount
    • useSteering

      protected final boolean useSteering
    • usePathfinder

      protected final boolean usePathfinder
    • skipSteering

      protected final boolean skipSteering
    • minPathLength

      protected final double minPathLength
    • minPathLengthSquared

      protected final double minPathLengthSquared
    • canSkipSteering

      protected final boolean canSkipSteering
    • isAvoidingBlockDamage

      protected final boolean isAvoidingBlockDamage
    • isRelaxedMoveConstraints

      protected final boolean isRelaxedMoveConstraints
    • desiredAltitudeWeight

      protected final double desiredAltitudeWeight
    • dbgStatus

      protected final boolean dbgStatus
    • dbgProfile

      protected final boolean dbgProfile
    • dbgMaps

      protected final boolean dbgMaps
    • dbgOpens

      protected final boolean dbgOpens
    • dbgPath

      protected final boolean dbgPath
    • dbgRebuild

      protected final boolean dbgRebuild
    • dbgNodes

      protected final boolean dbgNodes
    • dbgStay

      protected final boolean dbgStay
    • dbgMotionState

      protected final boolean dbgMotionState
    • aStar

      @Nonnull protected final T extends AStarBase aStar
    • aStarDebug

      @Nonnull protected final AStarDebugBase aStarDebug
    • pathFollower

      protected final PathFollower pathFollower
    • probeMoveData

      protected final ProbeMoveData probeMoveData
    • sharedNodePoolProvider

      protected AStarNodePoolProvider sharedNodePoolProvider
    • throttleCount

      protected int throttleCount
    • throttleTime

      protected double throttleTime
    • targetDeltaSquared

      protected double targetDeltaSquared
    • wasSteering

      protected boolean wasSteering
    • throttleDelay

      protected double throttleDelay
    • passedWaypoint

      protected boolean passedWaypoint
    • wasAvoidingBlockDamage

      protected boolean wasAvoidingBlockDamage
    • dbgDisplayString

      protected boolean dbgDisplayString
    • debugString

      protected StringBuilder debugString
  • Constructor Details

  • Method Details

    • activate

      public void activate(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Specified by:
      activate in interface Motion
    • deactivate

      public void deactivate(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Specified by:
      deactivate in interface Motion
    • computeSteering

      public boolean computeSteering(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nullable InfoProvider infoProvider, double dt, @Nonnull Steering desiredSteering, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Specified by:
      computeSteering in interface Motion
    • findBestPath

      public abstract void findBestPath(AStarBase var1, com.hypixel.hytale.server.npc.movement.controllers.MotionController var2)
    • startPathFinder

      protected boolean startPathFinder(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d position, Role role, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • continuePathFinder

      protected boolean continuePathFinder(@Nonnull Ref<EntityStore> ref, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • updatePathFollower

      protected boolean updatePathFollower(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d position, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • canSwitchToSteering

      protected boolean canSwitchToSteering(@Nonnull Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • shouldSkipSteering

      protected boolean shouldSkipSteering(@Nonnull Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • computeSteering

      protected boolean computeSteering(@Nonnull Ref<EntityStore> ref, Role role, Vector3d position, Steering desiredSteering, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • scaleSteering

      protected boolean scaleSteering(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull SteeringForceWithTarget steeringForce, @Nonnull Steering desiredSteering, double desiredAltitudeWeight, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • computeDesiredYTranslation

      protected double computeDesiredYTranslation(@Nonnull Steering desiredSteering, float maxAngle, double desiredAltitudeWeight)
    • onNoPathFound

      protected void onNoPathFound(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController)
    • onBlockedPath

      protected void onBlockedPath()
    • onSteering

      protected void onSteering(com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor)
    • onThrottling

      protected void onThrottling(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Ref<EntityStore> ref, Steering steering, ComponentAccessor<EntityStore> componentAccessor)
    • onDeferring

      protected void onDeferring(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Ref<EntityStore> ref, Steering steering, ComponentAccessor<EntityStore> componentAccessor)
    • mustAbortThrottling

      protected boolean mustAbortThrottling(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Ref<EntityStore> ref)
    • isGoalReached

      protected abstract boolean isGoalReached(Ref<EntityStore> var1, com.hypixel.hytale.server.npc.movement.controllers.MotionController var2, Vector3d var3, ComponentAccessor<EntityStore> var4)
    • setNavState

      protected void setNavState(NavState state, String label, boolean reset, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController)
    • decorateDebugString

      protected void decorateDebugString(StringBuilder dbgString)
    • setNavStateInit

      protected void setNavStateInit(@Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController)
    • setNavStateComputing

      protected void setNavStateComputing(@Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController)
    • setNavStateDeferred

      protected void setNavStateDeferred(@Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController)
    • setNavStateAtGoal

      protected void setNavStateAtGoal(@Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController)
    • setNavStateFollowing

      protected void setNavStateFollowing(@Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController)
    • setNavStateSteering

      protected void setNavStateSteering(@Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController)
    • setNavStateBlocked

      protected void setNavStateBlocked(@Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController)
    • setNavStateAborted

      protected void setNavStateAborted(@Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController)
    • setNavStateThrottling

      protected void setNavStateThrottling(@Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController)
    • setPath

      protected void setPath(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d position, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • resetThrottleCount

      protected void resetThrottleCount()
    • startComputePath

      protected AStarBase.Progress startComputePath(@Nonnull Ref<EntityStore> ref, Role role, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, @Nonnull Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • shouldDeferPathComputation

      protected boolean shouldDeferPathComputation(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • canComputeMotion

      protected boolean canComputeMotion(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nullable InfoProvider positionProvider, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • mustRecomputePath

      protected boolean mustRecomputePath(@Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController)
    • getRelativeSpeed

      protected double getRelativeSpeed()
    • forceRecomputePath

      protected void forceRecomputePath(com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController)