Contents
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, DebugSupport.DebugFlagsChangeListener, IAnnotatedComponent
- Direct Known Subclasses:
BodyMotionLand
-
Nested Class Summary
Nested classes/interfaces inherited from class BodyMotionFindBase
BodyMotionFindBase.DebugFlags -
Constructor Summary
ConstructorsConstructorDescriptionBodyMotionFind(BuilderBodyMotionFind builderMotionFind, BuilderSupport support) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanComputeMotion(Ref<EntityStore> ref, ExecutionSupport executionSupport, InfoProvider infoProvider, ComponentAccessor<EntityStore> componentAccessor) floatestimateToGoal(AStarBase aStarBase, org.joml.Vector3d fromPosition, MotionController motionController) voidfindBestPath(AStarBase aStarBase, MotionController controller) doubleGet desired target distance from the steering motion.Get the desired target entity from the steering motion.booleanisGoalReached(Ref<EntityStore> ref, AStarBase aStarBase, AStarNode aStarNode, MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) Methods inherited from class BodyMotionFindWithTarget
activate, deactivate, forceRecomputePath, isGoalReached, mustRecomputePath, onBlockedPath, onNoPathFound, shouldDeferPathComputation, startComputePathMethods inherited from class BodyMotionFindBase
computeSteering, 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, 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
-
BodyMotionFind
public BodyMotionFind(@Nonnull BuilderBodyMotionFind builderMotionFind, @Nonnull BuilderSupport support)
-
-
Method Details
-
canComputeMotion
public boolean canComputeMotion(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, @Nullable InfoProvider infoProvider, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
canComputeMotionin classBodyMotionFindWithTarget
-
getDesiredTargetDistance
public double getDesiredTargetDistance()Description copied from interface:BodyMotionGet desired target distance from the steering motion.Separation ranges can be larger than the desired distance from a target. To ensure that the target can be reached the NPC needs to know the desired target distance when computing separation.
- Returns:
- Desired target distance or a really large value if not applicable.
-
getDesiredTargetEntity
Description copied from interface:BodyMotionGet the desired target entity from the steering motion.This is required to match the desired target distance with the actual target entity when computing separation.
- Returns:
- Desired target entity or null if not applicable.
-