Contents
- Description
- Nested Class Summary
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- activate(Ref, ExecutionSupport, ComponentAccessor)
- deactivate(Ref, ExecutionSupport, ComponentAccessor)
- canComputeMotion(Ref, ExecutionSupport, InfoProvider, ComponentAccessor)
- mustRecomputePath(Ref, MotionController, ComponentAccessor)
- forceRecomputePath(MotionController)
- shouldDeferPathComputation(MotionController, Vector3d, ComponentAccessor)
- isGoalReached(Ref, MotionController, Vector3d, ComponentAccessor)
- startComputePath(Ref, ExecutionSupport, MotionController, Vector3d, ComponentAccessor)
- onBlockedPath()
- onNoPathFound(MotionController)
Class BodyMotionFindWithTarget
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
- All Implemented Interfaces:
BodyMotion, Motion, RoleStateChange, AStarEvaluator, DebugSupport.DebugFlagsChangeListener, IAnnotatedComponent
- Direct Known Subclasses:
BodyMotionFind, BodyMotionMoveAway
-
Nested Class Summary
Nested classes/interfaces inherited from class BodyMotionFindBase
BodyMotionFindBase.DebugFlags -
Constructor Summary
ConstructorsConstructorDescriptionBodyMotionFindWithTarget(BuilderBodyMotionFindWithTarget builderMotionFindWithTarget, BuilderSupport support) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(Ref<EntityStore> ref, ExecutionSupport executionSupport, ComponentAccessor<EntityStore> componentAccessor) Called to activate this motionbooleancanComputeMotion(Ref<EntityStore> ref, ExecutionSupport executionSupport, InfoProvider infoProvider, ComponentAccessor<EntityStore> componentAccessor) voiddeactivate(Ref<EntityStore> ref, ExecutionSupport executionSupport, ComponentAccessor<EntityStore> componentAccessor) Called to deactivate this motionvoidforceRecomputePath(MotionController activeMotionController) booleanisGoalReached(Ref<EntityStore> ref, MotionController activeMotionController, org.joml.Vector3d position, ComponentAccessor<EntityStore> componentAccessor) booleanmustRecomputePath(Ref<EntityStore> ref, MotionController activeMotionController, ComponentAccessor<EntityStore> componentAccessor) voidvoidonNoPathFound(MotionController motionController) booleanshouldDeferPathComputation(MotionController motionController, org.joml.Vector3d position, ComponentAccessor<EntityStore> componentAccessor) startComputePath(Ref<EntityStore> ref, ExecutionSupport executionSupport, MotionController activeMotionController, org.joml.Vector3d position, ComponentAccessor<EntityStore> componentAccessor) Methods inherited from class BodyMotionFindBase
computeSteering, findBestPath, 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 AStarEvaluator
estimateToGoal, isGoalReachedMethods 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
-
BodyMotionFindWithTarget
public BodyMotionFindWithTarget(@Nonnull BuilderBodyMotionFindWithTarget builderMotionFindWithTarget, @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 classBodyMotionFindBase<AStarWithTarget>- Parameters:
ref- The entity ref of the NPCexecutionSupport- TheExecutionSupportcomponentAccessor- The entity store for component access
-
deactivate
public void deactivate(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:MotionCalled to deactivate this motion- Specified by:
deactivatein interfaceMotion- Overrides:
deactivatein classBodyMotionFindBase<AStarWithTarget>- Parameters:
ref- The entity refexecutionSupport- TheExecutionSupportcomponentAccessor- The component store for component access
-
canComputeMotion
public boolean canComputeMotion(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, @Nullable InfoProvider infoProvider, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
mustRecomputePath
public boolean mustRecomputePath(@Nonnull Ref<EntityStore> ref, @Nonnull MotionController activeMotionController, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
forceRecomputePath
-
shouldDeferPathComputation
public boolean shouldDeferPathComputation(@Nonnull MotionController motionController, org.joml.Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
isGoalReached
public boolean isGoalReached(Ref<EntityStore> ref, MotionController activeMotionController, org.joml.Vector3d position, ComponentAccessor<EntityStore> componentAccessor) -
startComputePath
public AStarBase.Progress startComputePath(@Nonnull Ref<EntityStore> ref, ExecutionSupport executionSupport, @Nonnull MotionController activeMotionController, @Nonnull org.joml.Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
onBlockedPath
public void onBlockedPath() -
onNoPathFound
-