Class BodyMotionFindBase<T extends AStarBase>
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<T>
- All Implemented Interfaces:
BodyMotion,Motion,RoleStateChange,AStarEvaluator,IAnnotatedComponent
- Direct Known Subclasses:
BodyMotionFindWithTarget,BodyMotionLeave
public abstract class BodyMotionFindBase<T extends AStarBase>
extends BodyMotionBase
implements AStarEvaluator
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Tprotected final AStarDebugBaseprotected final booleanprotected booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected StringBuilderprotected final doubleprotected final booleanprotected final booleanprotected final doubleprotected final doubleprotected final intprotected booleanprotected final PathFollowerprotected final ProbeMoveDataprotected AStarNodePoolProviderprotected final booleanprotected doubleprotected intprotected doubleprotected final doubleprotected final doubleprotected final intprotected doubleprotected final booleanprotected final booleanprotected final booleanprotected booleanprotected booleanFields inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
index, parent -
Constructor Summary
ConstructorsConstructorDescriptionBodyMotionFindBase(BuilderBodyMotionFindBase builderBodyMotionFindBase, BuilderSupport support, T aStar) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(Ref<EntityStore> ref, Role role, ComponentAccessor<EntityStore> componentAccessor) protected booleancanComputeMotion(Ref<EntityStore> ref, Role role, InfoProvider positionProvider, ComponentAccessor<EntityStore> componentAccessor) protected booleancanSwitchToSteering(Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) protected doublecomputeDesiredYTranslation(Steering desiredSteering, float maxAngle, double desiredAltitudeWeight) 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) protected booleancontinuePathFinder(Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, ComponentAccessor<EntityStore> componentAccessor) voiddeactivate(Ref<EntityStore> ref, Role role, ComponentAccessor<EntityStore> componentAccessor) protected voiddecorateDebugString(StringBuilder dbgString) abstract voidfindBestPath(AStarBase var1, com.hypixel.hytale.server.npc.movement.controllers.MotionController var2) protected voidforceRecomputePath(com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController) protected doubleprotected abstract booleanisGoalReached(Ref<EntityStore> var1, com.hypixel.hytale.server.npc.movement.controllers.MotionController var2, Vector3d var3, ComponentAccessor<EntityStore> var4) protected booleanmustAbortThrottling(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Ref<EntityStore> ref) protected booleanmustRecomputePath(com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController) protected voidprotected voidonDeferring(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Ref<EntityStore> ref, Steering steering, ComponentAccessor<EntityStore> componentAccessor) protected voidonNoPathFound(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) protected voidonThrottling(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Ref<EntityStore> ref, Steering steering, ComponentAccessor<EntityStore> componentAccessor) protected voidprotected booleanscaleSteering(Ref<EntityStore> ref, Role role, SteeringForceWithTarget steeringForce, Steering desiredSteering, double desiredAltitudeWeight, ComponentAccessor<EntityStore> componentAccessor) protected voidsetNavState(NavState state, String label, boolean reset, com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController) protected voidsetNavStateAborted(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController) protected voidsetNavStateAtGoal(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController) protected voidsetNavStateBlocked(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController) protected voidsetNavStateComputing(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController) protected voidsetNavStateDeferred(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController) protected voidsetNavStateFollowing(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController) protected voidsetNavStateInit(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController) protected voidsetNavStateSteering(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController) protected voidsetNavStateThrottling(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController) protected voidsetPath(Ref<EntityStore> ref, Vector3d position, com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, ComponentAccessor<EntityStore> componentAccessor) protected booleanshouldDeferPathComputation(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Vector3d position, ComponentAccessor<EntityStore> componentAccessor) protected booleanshouldSkipSteering(Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, Vector3d position, ComponentAccessor<EntityStore> componentAccessor) protected AStarBase.ProgressstartComputePath(Ref<EntityStore> ref, Role role, com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, Vector3d position, ComponentAccessor<EntityStore> componentAccessor) protected booleanstartPathFinder(Ref<EntityStore> ref, Vector3d position, Role role, com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, ComponentAccessor<EntityStore> componentAccessor) protected booleanupdatePathFollower(Ref<EntityStore> ref, Vector3d position, com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, ComponentAccessor<EntityStore> componentAccessor) Methods 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
-
nodesPerTick
protected final int nodesPerTick -
useBestPath
protected final boolean useBestPath -
throttleDelayMin
protected final double throttleDelayMin -
throttleDelayMax
protected final double throttleDelayMax -
throttleIgnoreCount
protected final int throttleIgnoreCount -
useSteering
protected final boolean useSteering -
usePathfinder
protected final boolean usePathfinder -
skipSteering
protected final boolean skipSteering -
minPathLength
protected final double minPathLength -
minPathLengthSquared
protected final double minPathLengthSquared -
canSkipSteering
protected final boolean canSkipSteering -
isAvoidingBlockDamage
protected final boolean isAvoidingBlockDamage -
isRelaxedMoveConstraints
protected final boolean isRelaxedMoveConstraints -
desiredAltitudeWeight
protected final double desiredAltitudeWeight -
dbgStatus
protected final boolean dbgStatus -
dbgProfile
protected final boolean dbgProfile -
dbgMaps
protected final boolean dbgMaps -
dbgOpens
protected final boolean dbgOpens -
dbgPath
protected final boolean dbgPath -
dbgRebuild
protected final boolean dbgRebuild -
dbgNodes
protected final boolean dbgNodes -
dbgStay
protected final boolean dbgStay -
dbgMotionState
protected final boolean dbgMotionState -
aStar
-
aStarDebug
-
pathFollower
-
probeMoveData
-
throttleCount
protected int throttleCount -
throttleTime
protected double throttleTime -
targetDeltaSquared
protected double targetDeltaSquared -
wasSteering
protected boolean wasSteering -
throttleDelay
protected double throttleDelay -
passedWaypoint
protected boolean passedWaypoint -
wasAvoidingBlockDamage
protected boolean wasAvoidingBlockDamage -
dbgDisplayString
protected boolean dbgDisplayString -
debugString
-
-
Constructor Details
-
BodyMotionFindBase
public BodyMotionFindBase(@Nonnull BuilderBodyMotionFindBase builderBodyMotionFindBase, @Nonnull BuilderSupport support, @Nonnull T aStar)
-
-
Method Details
-
activate
public void activate(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
deactivate
public void deactivate(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
deactivatein interfaceMotion
-
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
-
startPathFinder
protected boolean startPathFinder(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d position, Role role, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
continuePathFinder
protected boolean continuePathFinder(@Nonnull Ref<EntityStore> ref, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
updatePathFollower
protected boolean updatePathFollower(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d position, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
canSwitchToSteering
protected boolean canSwitchToSteering(@Nonnull Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
shouldSkipSteering
protected boolean shouldSkipSteering(@Nonnull Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
computeSteering
protected boolean computeSteering(@Nonnull Ref<EntityStore> ref, Role role, Vector3d position, Steering desiredSteering, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
scaleSteering
protected boolean scaleSteering(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull SteeringForceWithTarget steeringForce, @Nonnull Steering desiredSteering, double desiredAltitudeWeight, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
computeDesiredYTranslation
protected double computeDesiredYTranslation(@Nonnull Steering desiredSteering, float maxAngle, double desiredAltitudeWeight) -
onNoPathFound
protected void onNoPathFound(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController) -
onBlockedPath
protected void onBlockedPath() -
onSteering
protected void onSteering(com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) -
onThrottling
protected void onThrottling(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Ref<EntityStore> ref, Steering steering, ComponentAccessor<EntityStore> componentAccessor) -
onDeferring
protected void onDeferring(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Ref<EntityStore> ref, Steering steering, ComponentAccessor<EntityStore> componentAccessor) -
mustAbortThrottling
protected boolean mustAbortThrottling(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Ref<EntityStore> ref) -
isGoalReached
protected abstract boolean isGoalReached(Ref<EntityStore> var1, com.hypixel.hytale.server.npc.movement.controllers.MotionController var2, Vector3d var3, ComponentAccessor<EntityStore> var4) -
decorateDebugString
-
setPath
protected void setPath(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d position, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
resetThrottleCount
protected void resetThrottleCount() -
startComputePath
protected 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) -
shouldDeferPathComputation
protected boolean shouldDeferPathComputation(com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
canComputeMotion
protected boolean canComputeMotion(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nullable InfoProvider positionProvider, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
mustRecomputePath
protected boolean mustRecomputePath(@Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController) -
getRelativeSpeed
protected double getRelativeSpeed() -
forceRecomputePath
protected void forceRecomputePath(com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController)
-