All Implemented Interfaces:
BodyMotion, Motion, RoleStateChange, IAnnotatedComponent

public class BodyMotionPath extends BodyMotionBase
  • Field Details

    • MIN_GUARD_POINT_WAIT_TIME

      public static final double MIN_GUARD_POINT_WAIT_TIME
      See Also:
    • TESTING

      public static final boolean TESTING
      See Also:
    • shape

      protected final BodyMotionPath.Shape shape
    • pathWidth

      protected final double pathWidth
    • nodeWidth

      protected final double nodeWidth
    • minRelativeSpeed

      protected final double minRelativeSpeed
    • maxRelativeSpeed

      protected final double maxRelativeSpeed
    • minWalkDistance

      protected final double minWalkDistance
    • maxWalkDistance

      protected final double maxWalkDistance
    • startAtNearestNode

      protected final boolean startAtNearestNode
    • direction

      protected final BodyMotionPath.Direction direction
    • minNodeDelay

      protected final double minNodeDelay
    • maxNodeDelay

      protected final double maxNodeDelay
    • viewSegments

      protected final int viewSegments
    • useNodeViewDirection

      protected final boolean useNodeViewDirection
    • pickRandomAngle

      protected final boolean pickRandomAngle
    • minDelayScale

      protected final double minDelayScale
    • maxDelayScale

      protected final double maxDelayScale
    • minPercentage

      protected final double minPercentage
    • maxPercentage

      protected final double maxPercentage
    • currentWaypointIndex

      protected int currentWaypointIndex
    • currentDirection

      @Nullable protected BodyMotionPath.Direction currentDirection
    • currentWaypointPosition

      protected final Vector3d currentWaypointPosition
    • lastWaypointPosition

      protected final Vector3d lastWaypointPosition
    • visitOrder

      protected final it.unimi.dsi.fastutil.ints.IntList visitOrder
    • visitIndex

      protected int visitIndex
    • steeringForceRotate

      protected final SteeringForceRotate steeringForceRotate
    • steeringForcePursue

      protected final SteeringForcePursue steeringForcePursue
    • currentSpeed

      protected double currentSpeed
    • currentPosition

      protected final Vector3d currentPosition
    • nextPosition

      protected final Vector3d nextPosition
    • nextPositionValid

      protected boolean nextPositionValid
    • currentNodeDelay

      protected double currentNodeDelay
    • pendingNodeDelay

      protected boolean pendingNodeDelay
    • rotatingToView

      protected boolean rotatingToView
    • nodeViewDirection

      protected float nodeViewDirection
    • nodeWaitTime

      protected double nodeWaitTime
    • observationSector

      protected float observationSector
    • currentObservationDelay

      protected double currentObservationDelay
    • rotating

      protected boolean rotating
    • previousSteeringTranslation

      protected final Vector3d previousSteeringTranslation
    • currentViewSegment

      protected int currentViewSegment
  • Constructor Details

  • Method Details

    • activate

      public void activate(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • loaded

      public void loaded(Role role)
    • computeSteering

      public boolean computeSteering(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nullable InfoProvider sensorInfo, double dt, @Nonnull Steering desiredSteering, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • tickObservationDelay

      protected boolean tickObservationDelay(double dt)
    • pickNextObservationAngle

      protected void pickNextObservationAngle()
    • closeToPosition

      protected boolean closeToPosition(Vector3d position, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController)
    • invalidateWaypoint

      protected void invalidateWaypoint()
    • nextWayPoint

      protected boolean nextWayPoint(@Nonnull IPath<?> path, @Nonnull WorldSupport support, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • getFirstWaypoint

      protected boolean getFirstWaypoint(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nullable IPath<?> path, @Nonnull Vector3d lastPos, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • waypointIndexUpdated

      protected void waypointIndexUpdated(@Nonnull IPath<?> path, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • initializeCurrentDirection

      protected void initializeCurrentDirection()
    • reset

      protected void reset()