Class BodyMotionMaintainDistance
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.BodyMotionMaintainDistance
- All Implemented Interfaces:
BodyMotion,Motion,RoleStateChange,IAnnotatedComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected DoubleParameterProviderprotected DoubleParameterProviderprotected DoubleParameterProviderprotected final double[]protected final SteeringForceEvadeprotected final double[]protected booleanprotected final intprotected final intprotected final doubleprotected final doubleprotected booleanprotected booleanprotected static final floatprotected final intprotected final doubleprotected final doubleprotected final SteeringForcePursueprotected doubleprotected intprotected final double[]protected final double[]protected final doubleprotected doubleprotected final Vector3dprotected final double[]protected final Vector3dprotected static final ComponentType<EntityStore, TransformComponent> Fields inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
index, parent -
Constructor Summary
ConstructorsConstructorDescriptionBodyMotionMaintainDistance(BuilderBodyMotionMaintainDistance builder, BuilderSupport support) -
Method Summary
Modifier and TypeMethodDescriptionbooleancomputeSteering(Ref<EntityStore> ref, Role support, InfoProvider sensorInfo, double dt, Steering desiredSteering, ComponentAccessor<EntityStore> componentAccessor) voiddeactivate(Ref<EntityStore> ref, Role role, ComponentAccessor<EntityStore> componentAccessor) protected booleantickStrafingDelay(double dt) 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.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
activate, preComputeSteeringMethods inherited from interface com.hypixel.hytale.server.npc.instructions.RoleStateChange
loaded, motionControllerChanged, registerWithSupport, removed, spawned, teleported, unloaded
-
Field Details
-
TRANSFORM_COMPONENT_TYPE
-
POSITIONING_ANGLE_THRESHOLD
protected static final float POSITIONING_ANGLE_THRESHOLD- See Also:
-
initialDesiredDistanceRange
protected final double[] initialDesiredDistanceRange -
moveThreshold
protected final double moveThreshold -
thresholdDistanceRangeSquared
@Nonnull protected final double[] thresholdDistanceRangeSquared -
targetDistanceFactor
protected final double targetDistanceFactor -
relativeForwardsSpeed
protected final double relativeForwardsSpeed -
relativeBackwardsSpeed
protected final double relativeBackwardsSpeed -
moveTowardsSlowdownThreshold
protected final double moveTowardsSlowdownThreshold -
strafingDurationRange
protected final double[] strafingDurationRange -
strafingFrequencyRange
protected final double[] strafingFrequencyRange -
minRangeProviderSlot
protected final int minRangeProviderSlot -
maxRangeProviderSlot
protected final int maxRangeProviderSlot -
positioningAngleProviderSlot
protected final int positioningAngleProviderSlot -
desiredDistanceRange
protected final double[] desiredDistanceRange -
targetDistanceSquared
protected double targetDistanceSquared -
approaching
protected boolean approaching -
movingAway
protected boolean movingAway -
strafingDirection
protected int strafingDirection -
strafingDelay
protected double strafingDelay -
pauseStrafing
protected boolean pauseStrafing -
flee
-
seek
-
targetPosition
-
toTarget
-
cachedMinRangeProvider
-
cachedMaxRangeProvider
-
cachedPositioningAngleProvider
-
initialised
protected boolean initialised
-
-
Constructor Details
-
BodyMotionMaintainDistance
public BodyMotionMaintainDistance(@Nonnull BuilderBodyMotionMaintainDistance builder, @Nonnull BuilderSupport support)
-
-
Method Details
-
computeSteering
public boolean computeSteering(@Nonnull Ref<EntityStore> ref, @Nonnull Role support, @Nullable InfoProvider sensorInfo, double dt, @Nonnull Steering desiredSteering, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
tickStrafingDelay
protected boolean tickStrafingDelay(double dt) -
deactivate
public void deactivate(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
-