Class BodyMotionWanderBase
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.BodyMotionWanderBase
- All Implemented Interfaces:
BodyMotion,Motion,RoleStateChange,IAnnotatedComponent
- Direct Known Subclasses:
BodyMotionWander,BodyMotionWanderInCircle,BodyMotionWanderInRect
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected floatprotected booleanprotected final doubleprotected doublestatic final intprotected intprotected final intprotected final booleanprotected final booleanstatic final com.hypixel.hytale.logger.HytaleLoggerprotected final byteprotected doubleprotected doubleprotected final floatprotected final doublestatic final doublestatic final doubleprotected final byteprotected final floatprotected final doubleprotected final doubleprotected final byte[]protected final Vector3dprotected doubleprotected final ProbeMoveDataprotected final Vector3dprotected final doubleprotected final booleanprotected final SteeringForcePursuestatic final floatprotected BodyMotionWanderBase.Stateprotected final doubleprotected final Vector3dprotected final intprotected final byte[]protected doubleprotected final double[]protected floatprotected doubleFields inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
index, parent -
Constructor Summary
ConstructorsConstructorDescriptionBodyMotionWanderBase(BuilderBodyMotionWanderBase builder, BuilderSupport builderSupport) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(Ref<EntityStore> ref, Role role, ComponentAccessor<EntityStore> componentAccessor) private intaddPreOrderedDirection(int direction, int count) protected voidcomputeHeightRange(Ref<EntityStore> ref, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) booleancomputeSteering(Ref<EntityStore> ref, Role role, InfoProvider sensorInfo, double dt, Steering desiredSteering, ComponentAccessor<EntityStore> componentAccessor) private voidcomputeTargetPosition(Ref<EntityStore> ref, float heading, double distance, ComponentAccessor<EntityStore> componentAccessor) protected abstract doubleconstrainMove(Ref<EntityStore> var1, Role var2, Vector3d var3, Vector3d var4, double var5, ComponentAccessor<EntityStore> var7) voiddeactivate(Ref<EntityStore> ref, Role role, ComponentAccessor<EntityStore> componentAccessor) protected booleanfindBestDirection(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidmotionControllerChanged(Ref<EntityStore> ref, NPCEntity npcComponent, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) protected booleanprobeDirection(Ref<EntityStore> ref, int dirIndex, Role role, ComponentAccessor<EntityStore> componentAccessor) protected voidrestartSearch(Ref<EntityStore> ref, NPCEntity npcComponent, com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, ComponentAccessor<EntityStore> componentAccessor) protected floattoAngle(Ref<EntityStore> ref, int direction, 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.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, registerWithSupport, removed, spawned, teleported, unloaded
-
Field Details
-
LOGGER
public static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
DIRECTION_COUNT
public static final int DIRECTION_COUNT- See Also:
-
SEGMENT_ANGLE
public static final float SEGMENT_ANGLE- See Also:
-
MIN_DISTANCE_SHRINK
public static final double MIN_DISTANCE_SHRINK- See Also:
-
MIN_DISTANCE_SHRINK_SCALE
public static final double MIN_DISTANCE_SHRINK_SCALE- See Also:
-
minWalkTime
protected final double minWalkTime -
maxWalkTime
protected final double maxWalkTime -
minHeadingChange
protected final float minHeadingChange -
maxHeadingChange
protected final float maxHeadingChange -
minDirection
protected final byte minDirection -
maxDirection
protected final byte maxDirection -
relaxHeadingChange
protected final boolean relaxHeadingChange -
relativeSpeed
protected final double relativeSpeed -
minMoveDistance
protected final double minMoveDistance -
stopDistance
protected final double stopDistance -
testsPerTick
protected final int testsPerTick -
isAvoidingBlockDamage
protected final boolean isAvoidingBlockDamage -
isRelaxedMoveConstraints
protected final boolean isRelaxedMoveConstraints -
desiredAltitudeWeight
protected final double desiredAltitudeWeight -
preOrderedDirections
protected final byte[] preOrderedDirections -
insideConeCount
protected final int insideConeCount -
targetPosition
-
probeDirection
-
probePosition
-
seekTarget
-
probeMoveData
-
debugSteer
protected boolean debugSteer -
state
-
angleOffset
protected float angleOffset -
probeDY
protected double probeDY -
maxDistanceAbove
protected double maxDistanceAbove -
maxDistanceBelow
protected double maxDistanceBelow -
walkTime
protected double walkTime -
walkHeading
protected float walkHeading -
walkDistance
protected double walkDistance -
directionIndex
protected int directionIndex -
desiredWalkDistance
protected double desiredWalkDistance -
walkDistances
protected final double[] walkDistances -
walkDirections
protected final byte[] walkDirections
-
-
Constructor Details
-
BodyMotionWanderBase
public BodyMotionWanderBase(@Nonnull BuilderBodyMotionWanderBase builder, @Nonnull BuilderSupport builderSupport)
-
-
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) -
motionControllerChanged
public void motionControllerChanged(@Nullable Ref<EntityStore> ref, @Nonnull NPCEntity npcComponent, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, @Nullable ComponentAccessor<EntityStore> componentAccessor) -
computeSteering
public boolean computeSteering(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nullable InfoProvider sensorInfo, double dt, @Nonnull Steering desiredSteering, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
findBestDirection
protected boolean findBestDirection(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
constrainMove
protected abstract double constrainMove(@Nonnull Ref<EntityStore> var1, @Nonnull Role var2, @Nonnull Vector3d var3, @Nonnull Vector3d var4, double var5, @Nonnull ComponentAccessor<EntityStore> var7) -
restartSearch
protected void restartSearch(@Nullable Ref<EntityStore> ref, @Nonnull NPCEntity npcComponent, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController activeMotionController, @Nullable ComponentAccessor<EntityStore> componentAccessor) -
computeHeightRange
protected void computeHeightRange(@Nonnull Ref<EntityStore> ref, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
probeDirection
protected boolean probeDirection(@Nonnull Ref<EntityStore> ref, int dirIndex, @Nonnull Role role, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
computeTargetPosition
private void computeTargetPosition(@Nonnull Ref<EntityStore> ref, float heading, double distance, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
toAngle
protected float toAngle(@Nonnull Ref<EntityStore> ref, int direction, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
addPreOrderedDirection
private int addPreOrderedDirection(int direction, int count)
-