Contents
- Description
- Nested Class Summary
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- activate(Ref, ExecutionSupport, ComponentAccessor)
- computeSteering(Ref, ExecutionSupport, InfoProvider, double, Steering, ComponentAccessor)
- isGoalReached(Ref, AStarBase, AStarNode, MotionController, ComponentAccessor)
- estimateToGoal(AStarBase, Vector3d, MotionController)
- findBestPath(AStarBase, MotionController)
Class BodyMotionMoveAway
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.BodyMotionMoveAway
- All Implemented Interfaces:
BodyMotion, Motion, RoleStateChange, AStarEvaluator, DebugSupport.DebugFlagsChangeListener, IAnnotatedComponent
-
Nested Class Summary
Nested classes/interfaces inherited from class BodyMotionFindBase
BodyMotionFindBase.DebugFlags -
Constructor Summary
ConstructorsConstructorDescriptionBodyMotionMoveAway(BuilderBodyMotionMoveAway builderMotionFind, BuilderSupport support) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(Ref<EntityStore> ref, ExecutionSupport executionSupport, ComponentAccessor<EntityStore> componentAccessor) Called to activate this motionbooleancomputeSteering(Ref<EntityStore> ref, ExecutionSupport executionSupport, InfoProvider infoProvider, double dt, Steering desiredSteering, ComponentAccessor<EntityStore> componentAccessor) Calculate desired steering for MotionController.floatestimateToGoal(AStarBase aStarBase, org.joml.Vector3d fromPosition, MotionController motionController) voidfindBestPath(AStarBase aStarBase, MotionController controller) booleanisGoalReached(Ref<EntityStore> ref, AStarBase aStarBase, AStarNode aStarNode, MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) Methods inherited from class BodyMotionFindWithTarget
canComputeMotion, deactivate, forceRecomputePath, isGoalReached, mustRecomputePath, onBlockedPath, onNoPathFound, shouldDeferPathComputation, startComputePathMethods inherited from class BodyMotionFindBase
getRelaxedConstraints, onDebugFlagsChangedMethods inherited from class AnnotatedComponentBase
getIndex, getInfo, getParent, setContextMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BodyMotion
findWrappedBodyMotion, getDesiredTargetDistance, getDesiredTargetEntity, getSteeringMotionMethods inherited from interface IAnnotatedComponent
getBreadCrumbs, getBreadCrumbs, getIndex, getInfo, getLabel, getParent, setContextMethods inherited from interface Motion
preComputeSteeringMethods inherited from interface RoleStateChange
loaded, motionControllerChanged, registerWithSupport, removed, spawned, teleported, unloaded
-
Constructor Details
-
BodyMotionMoveAway
public BodyMotionMoveAway(@Nonnull BuilderBodyMotionMoveAway builderMotionFind, @Nonnull BuilderSupport support)
-
-
Method Details
-
activate
public void activate(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:MotionCalled to activate this motion- Specified by:
activatein interfaceMotion- Overrides:
activatein classBodyMotionFindWithTarget- Parameters:
ref- The entity ref of the NPCexecutionSupport- TheExecutionSupportcomponentAccessor- The entity store for component access
-
computeSteering
public boolean computeSteering(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, @Nullable InfoProvider infoProvider, double dt, @Nonnull Steering desiredSteering, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:MotionCalculate desired steering for MotionController.- Specified by:
computeSteeringin interfaceMotion- Overrides:
computeSteeringin classBodyMotionFindBase<AStarWithTarget>- Parameters:
ref- The entity refexecutionSupport- TheExecutionSupportinfoProvider- SensorInfo with PositionProvider, PathProvider, etc. if requireddt- The interval in seconds for this calculationdesiredSteering- The computed steering force for the MotionControllercomponentAccessor- The entity store- Returns:
falsewhen the end condition has been reached,trueif must be called again to reach end condition or is infinite.
-