Class BodyMotionFind
java.lang.Object
com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
com.hypixel.hytale.server.npc.corecomponents.MotionBase
com.hypixel.hytale.server.npc.corecomponents.BodyMotionBase
com.hypixel.hytale.server.npc.corecomponents.movement.BodyMotionFindBase<AStarWithTarget>
com.hypixel.hytale.server.npc.corecomponents.movement.BodyMotionFindWithTarget
com.hypixel.hytale.server.npc.corecomponents.movement.BodyMotionFind
- All Implemented Interfaces:
BodyMotion,Motion,RoleStateChange,AStarEvaluator,IAnnotatedComponent
- Direct Known Subclasses:
BodyMotionLand
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hypixel.hytale.server.npc.corecomponents.movement.BodyMotionFindBase
BodyMotionFindBase.DebugFlags -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final doubleprotected final doubleprotected final doubleprotected final doubleprotected doubleprotected final doubleprotected final doubleprotected final booleanprotected final SteeringForcePursueprotected final doubleprotected final doubleprotected final Vector3dFields inherited from class com.hypixel.hytale.server.npc.corecomponents.movement.BodyMotionFindWithTarget
adjustRangeByHitboxSize, coneDirection, conePosition, cosHalfRecomputeConeAngle, lastPathedPosition, minMoveDistanceRecompute, minMoveDistanceRecomputeSquared, minMoveDistanceReproject, minMoveDistanceReprojectSquared, minMoveDistanceWait, minMoveDistanceWaitSquared, other, self, selfBoundingBox, targetBoundingBox, waitForTargetMovementFields inherited from class com.hypixel.hytale.server.npc.corecomponents.movement.BodyMotionFindBase
aStar, aStarDebug, canSkipSteering, dbgDisplayString, dbgMaps, dbgMotionState, dbgNodes, dbgOpens, dbgPath, dbgProfile, dbgRebuild, dbgStatus, dbgStay, debugString, desiredAltitudeWeight, isAvoidingBlockDamage, isRelaxedMoveConstraints, minPathLength, minPathLengthSquared, nodesPerTick, passedWaypoint, pathFollower, probeMoveData, sharedNodePoolProvider, skipSteering, targetDeltaSquared, throttleCount, throttleDelay, throttleDelayMax, throttleDelayMin, throttleIgnoreCount, throttleTime, useBestPath, usePathfinder, useSteering, wasAvoidingBlockDamage, wasSteeringFields inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
index, parent -
Constructor Summary
ConstructorsConstructorDescriptionBodyMotionFind(BuilderBodyMotionFind builderMotionFind, BuilderSupport support) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanComputeMotion(Ref<EntityStore> ref, Role role, InfoProvider infoProvider, ComponentAccessor<EntityStore> componentAccessor) protected booleancanReachTarget(Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Vector3d position, Vector3d targetPosition, ComponentAccessor<EntityStore> componentAccessor) protected booleancanSwitchToSteering(Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) protected booleancomputeSteering(Ref<EntityStore> ref, Role role, Vector3d position, Steering desiredSteering, ComponentAccessor<EntityStore> componentAccessor) protected static booleancontainsPosition(double p, double min, double max, double v) protected booleancontainsPosition(Vector3d position, Vector3d endPosition) floatestimateToGoal(AStarBase aStarBase, Vector3d fromPosition, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController) voidfindBestPath(AStarBase aStarBase, com.hypixel.hytale.server.npc.movement.controllers.MotionController controller) protected booleanisBoundingBoxesOverlapping(Vector3d position, Vector3d endPosition) protected booleanisGoalReached(Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Vector3d position, Vector3d targetPosition, ComponentAccessor<EntityStore> componentAccessor) booleanisGoalReached(Ref<EntityStore> ref, AStarBase aStarBase, AStarNode aStarNode, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) protected voidlookAtTarget(Ref<EntityStore> ref, Steering steering, ComponentAccessor<EntityStore> componentAccessor) protected voidonDeferring(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Ref<EntityStore> ref, Steering steering, ComponentAccessor<EntityStore> componentAccessor) protected voidonThrottling(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Ref<EntityStore> ref, Steering steering, ComponentAccessor<EntityStore> componentAccessor) protected booleanshouldSkipSteering(Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, Vector3d position, ComponentAccessor<EntityStore> componentAccessor) Methods inherited from class com.hypixel.hytale.server.npc.corecomponents.movement.BodyMotionFindWithTarget
activate, decorateDebugString, forceRecomputePath, getLastAccessibleTargetPosition, getLastTargetPosition, isGoalReached, mustAbortThrottling, mustRecomputePath, onBlockedPath, onNoPathFound, onSteering, shouldDeferPathComputation, startComputePathMethods inherited from class com.hypixel.hytale.server.npc.corecomponents.movement.BodyMotionFindBase
computeDesiredYTranslation, computeSteering, continuePathFinder, deactivate, getRelativeSpeed, resetThrottleCount, scaleSteering, setNavState, setNavStateAborted, setNavStateAtGoal, setNavStateBlocked, setNavStateComputing, setNavStateDeferred, setNavStateFollowing, setNavStateInit, setNavStateSteering, setNavStateThrottling, setPath, startPathFinder, updatePathFollowerMethods inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
getIndex, getInfo, getParent, setContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hypixel.hytale.server.npc.instructions.BodyMotion
getSteeringMotionMethods inherited from interface com.hypixel.hytale.server.npc.util.IAnnotatedComponent
getBreadCrumbs, getBreadCrumbs, getIndex, getInfo, getLabel, getParent, setContextMethods inherited from interface com.hypixel.hytale.server.npc.instructions.Motion
preComputeSteeringMethods inherited from interface com.hypixel.hytale.server.npc.instructions.RoleStateChange
loaded, motionControllerChanged, registerWithSupport, removed, spawned, teleported, unloaded
-
Field Details
-
distance
protected final double distance -
distanceSquared
protected final double distanceSquared -
reachable
protected final boolean reachable -
heightDifferenceMin
protected final double heightDifferenceMin -
heightDifferenceMax
protected final double heightDifferenceMax -
abortDistance
protected final double abortDistance -
abortDistanceSquared
protected final double abortDistanceSquared -
switchToSteeringDistance
protected final double switchToSteeringDistance -
switchToSteeringDistanceSquared
protected final double switchToSteeringDistanceSquared -
seek
-
tempDirectionVector
-
effectiveDistanceSquared
protected double effectiveDistanceSquared
-
-
Constructor Details
-
BodyMotionFind
public BodyMotionFind(@Nonnull BuilderBodyMotionFind builderMotionFind, @Nonnull BuilderSupport support)
-
-
Method Details
-
canSwitchToSteering
protected boolean canSwitchToSteering(@Nonnull Ref<EntityStore> ref, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
canSwitchToSteeringin classBodyMotionFindBase<AStarWithTarget>
-
shouldSkipSteering
protected boolean shouldSkipSteering(@Nonnull Ref<EntityStore> ref, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, @Nonnull Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
shouldSkipSteeringin classBodyMotionFindBase<AStarWithTarget>
-
computeSteering
protected boolean computeSteering(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull Vector3d position, @Nonnull Steering desiredSteering, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
computeSteeringin classBodyMotionFindBase<AStarWithTarget>
-
canComputeMotion
public boolean canComputeMotion(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nullable InfoProvider infoProvider, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
canComputeMotionin classBodyMotionFindWithTarget
-
isGoalReached
protected boolean isGoalReached(@Nonnull Ref<EntityStore> ref, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, @Nonnull Vector3d position, @Nonnull Vector3d targetPosition, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
isGoalReachedin classBodyMotionFindWithTarget
-
onThrottling
protected void onThrottling(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, @Nonnull Ref<EntityStore> ref, @Nonnull Steering steering, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
onThrottlingin classBodyMotionFindBase<AStarWithTarget>
-
onDeferring
protected void onDeferring(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, @Nonnull Ref<EntityStore> ref, @Nonnull Steering steering, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
onDeferringin classBodyMotionFindBase<AStarWithTarget>
-
lookAtTarget
protected void lookAtTarget(@Nonnull Ref<EntityStore> ref, @Nonnull Steering steering, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
canReachTarget
protected boolean canReachTarget(@Nonnull Ref<EntityStore> ref, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, @Nonnull Vector3d position, @Nonnull Vector3d targetPosition, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
isBoundingBoxesOverlapping
-
containsPosition
-
containsPosition
protected static boolean containsPosition(double p, double min, double max, double v)
-