Class BodyMotionWanderInRect
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
com.hypixel.hytale.server.npc.corecomponents.movement.BodyMotionWanderInRect
- All Implemented Interfaces:
BodyMotion,Motion,RoleStateChange,IAnnotatedComponent
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hypixel.hytale.server.npc.corecomponents.movement.BodyMotionWanderBase
BodyMotionWanderBase.State -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected final doubleprotected final doubleprotected final doublestatic final intstatic final intstatic final intstatic final intstatic final intprotected final doubleFields inherited from class com.hypixel.hytale.server.npc.corecomponents.movement.BodyMotionWanderBase
angleOffset, debugSteer, desiredAltitudeWeight, desiredWalkDistance, DIRECTION_COUNT, directionIndex, insideConeCount, isAvoidingBlockDamage, isRelaxedMoveConstraints, LOGGER, maxDirection, maxDistanceAbove, maxDistanceBelow, maxHeadingChange, maxWalkTime, MIN_DISTANCE_SHRINK, MIN_DISTANCE_SHRINK_SCALE, minDirection, minHeadingChange, minMoveDistance, minWalkTime, preOrderedDirections, probeDirection, probeDY, probeMoveData, probePosition, relativeSpeed, relaxHeadingChange, seekTarget, SEGMENT_ANGLE, state, stopDistance, targetPosition, testsPerTick, walkDirections, walkDistance, walkDistances, walkHeading, walkTimeFields inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
index, parent -
Constructor Summary
ConstructorsConstructorDescriptionBodyMotionWanderInRect(BuilderBodyMotionWanderInRect builder, BuilderSupport builderSupport) -
Method Summary
Modifier and TypeMethodDescriptionprotected doubleconstrainMove(Ref<EntityStore> ref, Role role, Vector3d probePosition, Vector3d targetPosition, double moveDist, ComponentAccessor<EntityStore> componentAccessor) protected doubledistanceSquared(double x, double z, int sector) protected intsectorCode(double x, double z) Methods inherited from class com.hypixel.hytale.server.npc.corecomponents.movement.BodyMotionWanderBase
activate, computeHeightRange, computeSteering, deactivate, findBestDirection, motionControllerChanged, probeDirection, restartSearch, toAngleMethods 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
-
LEFT
public static final int LEFT- See Also:
-
RIGHT
public static final int RIGHT- See Also:
-
BOTTOM
public static final int BOTTOM- See Also:
-
TOP
public static final int TOP- See Also:
-
VERTICAL_MASK
public static final int VERTICAL_MASK- See Also:
-
HORIZONTAL_MASK
public static final int HORIZONTAL_MASK- See Also:
-
width
protected final double width -
depth
protected final double depth -
halfWidth
protected final double halfWidth -
halfDepth
protected final double halfDepth
-
-
Constructor Details
-
BodyMotionWanderInRect
public BodyMotionWanderInRect(@Nonnull BuilderBodyMotionWanderInRect builder, @Nonnull BuilderSupport builderSupport)
-
-
Method Details
-
constrainMove
protected double constrainMove(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull Vector3d probePosition, @Nonnull Vector3d targetPosition, double moveDist, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
constrainMovein classBodyMotionWanderBase
-
sectorCode
protected int sectorCode(double x, double z) -
distanceSquared
protected double distanceSquared(double x, double z, int sector)
-