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,IAnnotatedComponent
- Direct Known Subclasses:
BodyMotionFind,BodyMotionMoveAway
-
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 booleanprotected final Vector3dprotected final Vector3dprotected final floatprivate booleanprivate booleanprivate final Vector3dprivate booleanprotected final Vector3dprivate final Vector3dprotected final doubleprotected final doubleprotected final doubleprotected final doubleprotected final doubleprotected final doubleprotected Stringprotected Stringprotected Boxprotected Boxprotected booleanFields 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
ConstructorsConstructorDescriptionBodyMotionFindWithTarget(BuilderBodyMotionFindWithTarget builderMotionFindWithTarget, BuilderSupport support) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(Ref<EntityStore> ref, Role role, ComponentAccessor<EntityStore> componentAccessor) booleancanComputeMotion(Ref<EntityStore> ref, Role role, InfoProvider infoProvider, ComponentAccessor<EntityStore> componentAccessor) protected voiddecorateDebugString(StringBuilder dbgString) voidforceRecomputePath(com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController) protected Vector3dgetLastAccessibleTargetPosition(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, boolean approximate, ComponentAccessor<EntityStore> componentAccessor) protected Vector3dbooleanisGoalReached(Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, Vector3d position, ComponentAccessor<EntityStore> componentAccessor) protected abstract booleanisGoalReached(Ref<EntityStore> var1, com.hypixel.hytale.server.npc.movement.controllers.MotionController var2, Vector3d var3, Vector3d var4, ComponentAccessor<EntityStore> var5) protected booleanmustAbortThrottling(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Ref<EntityStore> ref) booleanmustRecomputePath(com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController) voidvoidonNoPathFound(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController) protected voidonSteering(com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) booleanshouldDeferPathComputation(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Vector3d position, ComponentAccessor<EntityStore> componentAccessor) startComputePath(Ref<EntityStore> ref, Role role, 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.BodyMotionFindBase
canSwitchToSteering, computeDesiredYTranslation, computeSteering, computeSteering, continuePathFinder, deactivate, findBestPath, getRelativeSpeed, onDeferring, onThrottling, resetThrottleCount, scaleSteering, setNavState, setNavStateAborted, setNavStateAtGoal, setNavStateBlocked, setNavStateComputing, setNavStateDeferred, setNavStateFollowing, setNavStateInit, setNavStateSteering, setNavStateThrottling, setPath, shouldSkipSteering, 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.navigation.AStarEvaluator
estimateToGoal, isGoalReachedMethods 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
-
minMoveDistanceWait
protected final double minMoveDistanceWait -
minMoveDistanceWaitSquared
protected final double minMoveDistanceWaitSquared -
minMoveDistanceRecompute
protected final double minMoveDistanceRecompute -
minMoveDistanceRecomputeSquared
protected final double minMoveDistanceRecomputeSquared -
cosHalfRecomputeConeAngle
protected final float cosHalfRecomputeConeAngle -
minMoveDistanceReproject
protected final double minMoveDistanceReproject -
minMoveDistanceReprojectSquared
protected final double minMoveDistanceReprojectSquared -
adjustRangeByHitboxSize
protected final boolean adjustRangeByHitboxSize -
lastPathedPosition
-
conePosition
-
coneDirection
-
targetBoundingBox
-
selfBoundingBox
-
waitForTargetMovement
protected boolean waitForTargetMovement -
lastTargetPosition
-
lastAccessibleTargetPosition
-
haveValidTargetPosition
private boolean haveValidTargetPosition -
haveAccessibleTargetPosition
private boolean haveAccessibleTargetPosition -
lastAccessibleTargetPositionIsCurrent
private boolean lastAccessibleTargetPositionIsCurrent -
self
-
other
-
-
Constructor Details
-
BodyMotionFindWithTarget
public BodyMotionFindWithTarget(@Nonnull BuilderBodyMotionFindWithTarget builderMotionFindWithTarget, @Nonnull BuilderSupport support)
-
-
Method Details
-
activate
public void activate(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
activatein interfaceMotion- Overrides:
activatein classBodyMotionFindBase<AStarWithTarget>
-
canComputeMotion
public boolean canComputeMotion(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nullable InfoProvider infoProvider, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
canComputeMotionin classBodyMotionFindBase<AStarWithTarget>
-
mustRecomputePath
public boolean mustRecomputePath(@Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController) - Overrides:
mustRecomputePathin classBodyMotionFindBase<AStarWithTarget>
-
forceRecomputePath
public void forceRecomputePath(com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController) - Overrides:
forceRecomputePathin classBodyMotionFindBase<AStarWithTarget>
-
shouldDeferPathComputation
public boolean shouldDeferPathComputation(@Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
shouldDeferPathComputationin classBodyMotionFindBase<AStarWithTarget>
-
mustAbortThrottling
protected boolean mustAbortThrottling(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Ref<EntityStore> ref) - Overrides:
mustAbortThrottlingin classBodyMotionFindBase<AStarWithTarget>
-
isGoalReached
public boolean isGoalReached(Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, Vector3d position, ComponentAccessor<EntityStore> componentAccessor) - Specified by:
isGoalReachedin classBodyMotionFindBase<AStarWithTarget>
-
startComputePath
public AStarBase.Progress startComputePath(@Nonnull Ref<EntityStore> ref, Role role, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, @Nonnull Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
startComputePathin classBodyMotionFindBase<AStarWithTarget>
-
onBlockedPath
public void onBlockedPath()- Overrides:
onBlockedPathin classBodyMotionFindBase<AStarWithTarget>
-
onNoPathFound
public void onNoPathFound(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController) - Overrides:
onNoPathFoundin classBodyMotionFindBase<AStarWithTarget>
-
onSteering
protected void onSteering(com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, @Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
onSteeringin classBodyMotionFindBase<AStarWithTarget>
-
decorateDebugString
- Overrides:
decorateDebugStringin classBodyMotionFindBase<AStarWithTarget>
-
isGoalReached
protected abstract boolean isGoalReached(Ref<EntityStore> var1, com.hypixel.hytale.server.npc.movement.controllers.MotionController var2, Vector3d var3, Vector3d var4, ComponentAccessor<EntityStore> var5) -
getLastTargetPosition
-
getLastAccessibleTargetPosition
protected Vector3d getLastAccessibleTargetPosition(@Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, boolean approximate, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
-