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,IAnnotatedComponent
-
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 floatprotected final doubleprotected final doubleprotected final floatprotected final SteeringForceEvadeprotected floatprotected final double[]protected doubleprotected final floatprotected final doubleprotected final doubleFields 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
ConstructorsConstructorDescriptionBodyMotionMoveAway(BuilderBodyMotionMoveAway builderMotionFind, BuilderSupport support) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(Ref<EntityStore> ref, Role role, ComponentAccessor<EntityStore> componentAccessor) protected booleancomputeSteering(Ref<EntityStore> ref, Role role, Vector3d position, Steering desiredSteering, ComponentAccessor<EntityStore> componentAccessor) booleancomputeSteering(Ref<EntityStore> ref, Role role, InfoProvider infoProvider, double dt, Steering desiredSteering, ComponentAccessor<EntityStore> componentAccessor) 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 booleanisGoalReached(Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Vector3d position, Vector3d lastTestedPosition, ComponentAccessor<EntityStore> componentAccessor) booleanisGoalReached(Ref<EntityStore> ref, AStarBase aStarBase, AStarNode aStarNode, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) Methods inherited from class com.hypixel.hytale.server.npc.corecomponents.movement.BodyMotionFindWithTarget
canComputeMotion, decorateDebugString, forceRecomputePath, getLastAccessibleTargetPosition, getLastTargetPosition, isGoalReached, mustAbortThrottling, mustRecomputePath, onBlockedPath, onNoPathFound, onSteering, shouldDeferPathComputation, startComputePathMethods inherited from class com.hypixel.hytale.server.npc.corecomponents.movement.BodyMotionFindBase
canSwitchToSteering, computeDesiredYTranslation, continuePathFinder, deactivate, 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.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
-
stopDistance
protected final double stopDistance -
stopDistanceSquared
protected final double stopDistanceSquared -
holdDirectionDurationRange
protected final double[] holdDirectionDurationRange -
changeDirectionViewSector
protected final float changeDirectionViewSector -
jitterAngle
protected final float jitterAngle -
erraticDistanceSquared
protected final double erraticDistanceSquared -
erraticJitter
protected final float erraticJitter -
erraticChangeDurationMultiplier
protected final double erraticChangeDurationMultiplier -
evade
-
fleeDirection
protected float fleeDirection -
holdDirectionTimeRemaining
protected double holdDirectionTimeRemaining
-
-
Constructor Details
-
BodyMotionMoveAway
public BodyMotionMoveAway(@Nonnull BuilderBodyMotionMoveAway builderMotionFind, @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 classBodyMotionFindWithTarget
-
computeSteering
public boolean computeSteering(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nullable InfoProvider infoProvider, double dt, @Nonnull Steering desiredSteering, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
computeSteeringin interfaceMotion- Overrides:
computeSteeringin classBodyMotionFindBase<AStarWithTarget>
-
computeSteering
protected boolean computeSteering(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, Vector3d position, @Nonnull Steering desiredSteering, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
computeSteeringin classBodyMotionFindBase<AStarWithTarget>
-
isGoalReached
protected boolean isGoalReached(Ref<EntityStore> ref, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Vector3d position, Vector3d lastTestedPosition, ComponentAccessor<EntityStore> componentAccessor) - Specified by:
isGoalReachedin classBodyMotionFindWithTarget
-