abstract class BodyMotionWanderBase extends BodyMotionBase
Class BodyMotionWanderBase. Provides bodymotionwanderbase functionality for the Hytale server.
java.lang.Object > BodyMotionBase > BodyMotionWanderBase
Field Summary
debugSteer
Field debugSteer.
state
Field state.
angleOffset
Field angleOffset.
probeDY
Field probeDY.
maxDistanceAbove
Field maxDistanceAbove.
maxDistanceBelow
Field maxDistanceBelow.
walkTime
Field walkTime.
walkHeading
Field walkHeading.
walkDistance
Field walkDistance.
directionIndex
Field directionIndex.
desiredWalkDistance
Field desiredWalkDistance.
avoidingBlockDamage
Field avoidingBlockDamage.
relaxedMoveConstraints
Field relaxedMoveConstraints.
npcComponent
Field npcComponent.
activeMotionController
Field activeMotionController.
headline
Field headline.
currentHorizontalSpeedMultiplier
Field currentHorizontalSpeedMultiplier.
transformComponent
Field transformComponent.
bodyRotation
Field bodyRotation.
stopDistance
Field stopDistance.
slowdownDistance
Field slowdownDistance.
heading
Field heading.
turnAngle
Field turnAngle.
d
Field d.
random
Field random.
d2
Field d2.
r
Field r.
scale
Field scale.
wanderVerticalMovementRatio
Field wanderVerticalMovementRatio.
verticalRange
Field verticalRange.
desiredAltitudeWeight
Field desiredAltitudeWeight.
y
Field y.
negativeMaxVerticalDistance
Field negativeMaxVerticalDistance.
direction
Field direction.
motionController
Field motionController.
constrainDistance
Field constrainDistance.
moveDistance
Field moveDistance.
Method Detail
BodyMotionWanderBase
public
BodyMotionWanderBase
(@Nonnull final BuilderBodyMotionWanderBase builder, @Nonnull final BuilderSupport builderSupport)
Method BodyMotionWanderBase.
- Parameters:
@Nonnull final BuilderBodyMotionWanderBasebuilder@Nonnull final BuilderSupportbuilderSupport
activate
void
activate
(@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)
Method activate.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerole@Nonnull final ComponentAccessorcomponentAccessor
deactivate
void
deactivate
(@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)
Method deactivate.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerole@Nonnull final ComponentAccessorcomponentAccessor
motionControllerChanged
void
motionControllerChanged
(@Nullable final Ref ref, @Nonnull final NPCEntity npcComponent, @Nonnull final MotionController motionController, @Nullable final ComponentAccessor componentAccessor)
Method motionControllerChanged.
- Parameters:
@Nullable final Refref@Nonnull final NPCEntitynpcComponent@Nonnull final MotionControllermotionController@Nullable final ComponentAccessorcomponentAccessor
computeSteering
boolean
computeSteering
(@Nonnull final Ref ref, @Nonnull final Role role, @Nullable final InfoProvider sensorInfo, final double dt, @Nonnull final Steering desiredSteering, @Nonnull final ComponentAccessor componentAccessor)
Method computeSteering.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerole@Nullable final InfoProvidersensorInfofinal doubledt@Nonnull final SteeringdesiredSteering@Nonnull final ComponentAccessorcomponentAccessor
Nameplate
new
Nameplate
(headline)
Method Nameplate.
- Parameters:
headlineheadline
if
else
if
(!this.probeDirection(ref, this.directionIndex, role, componentAccessor)
Method if.
- Parameters:
!this.probeDirection(ref!this.probeDirection(refthis.directionIndexthis.directionIndexrolerolecomponentAccessorcomponentAccessor
findBestDirection
boolean
findBestDirection
(@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)
Method findBestDirection.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentAccessorcomponentAccessor
restartSearch
void
restartSearch
(@Nullable final Ref ref, @Nonnull final NPCEntity npcComponent, @Nonnull final MotionController activeMotionController, @Nullable final ComponentAccessor componentAccessor)
Method restartSearch.
- Parameters:
@Nullable final Refref@Nonnull final NPCEntitynpcComponent@Nonnull final MotionControlleractiveMotionController@Nullable final ComponentAccessorcomponentAccessor
computeHeightRange
void
computeHeightRange
(@Nonnull final Ref ref, @Nonnull final MotionController motionController, @Nonnull final ComponentAccessor componentAccessor)
Method computeHeightRange.
- Parameters:
@Nonnull final Refref@Nonnull final MotionControllermotionController@Nonnull final ComponentAccessorcomponentAccessor
probeDirection
boolean
probeDirection
(@Nonnull final Ref ref, final int dirIndex, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)
Method probeDirection.
- Parameters:
@Nonnull final Refreffinal intdirIndex@Nonnull final Rolerole@Nonnull final ComponentAccessorcomponentAccessor
computeTargetPosition
void
computeTargetPosition
(@Nonnull final Ref ref, final float heading, final double distance, @Nonnull final ComponentAccessor componentAccessor)
Method computeTargetPosition.
- Parameters:
@Nonnull final Refreffinal floatheadingfinal doubledistance@Nonnull final ComponentAccessorcomponentAccessor
toAngle
float
toAngle
(@Nonnull final Ref ref, final int direction, @Nonnull final ComponentAccessor componentAccessor)
Method toAngle.
- Parameters:
@Nonnull final Refreffinal intdirection@Nonnull final ComponentAccessorcomponentAccessor
addPreOrderedDirection
int
addPreOrderedDirection
(final int direction, int count)
Method addPreOrderedDirection.
- Parameters:
final intdirectionintcount