BodyMotionWanderInRect

public class BodyMotionWanderInRect extends BodyMotionWanderBase

Class BodyMotionWanderInRect. Provides bodymotionwanderinrect functionality for the Hytale server.

java.lang.Object > BodyMotionWanderBase > BodyMotionWanderInRect

Field Summary

npcComponent

final NPCEntity npcComponent

Field npcComponent.

leash

final Vector3d leash

Field leash.

leashX

final double leashX

Field leashX.

leashZ

final double leashZ

Field leashZ.

endX

final double endX

Field endX.

endZ

final double endZ

Field endZ.

endCode

final int endCode

Field endCode.

startX

final double startX

Field startX.

startZ

final double startZ

Field startZ.

startCode

final int startCode

Field startCode.

or

final int or

Field or.

dx

final double dx

Field dx.

dz

final double dz

Field dz.

Method Detail

BodyMotionWanderInRect

public public BodyMotionWanderInRect (@Nonnull final BuilderBodyMotionWanderInRect builder, @Nonnull final BuilderSupport builderSupport)

Method BodyMotionWanderInRect.

Parameters:
@Nonnull final BuilderBodyMotionWanderInRect builder
@Nonnull final BuilderSupport builderSupport

constrainMove

protected double constrainMove (@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final Vector3d probePosition, @Nonnull final Vector3d targetPosition, final double moveDist, @Nonnull final ComponentAccessor componentAccessor)

Method constrainMove.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
@Nonnull final Vector3d probePosition
@Nonnull final Vector3d targetPosition
final double moveDist
@Nonnull final ComponentAccessor componentAccessor

if

public else if ((endCode & 0x2)

Method if.

Parameters:
(endCode & 0x2

sectorCode

protected int sectorCode (final double x, final double z)

Method sectorCode.

Parameters:
final double x
final double z

distanceSquared

protected double distanceSquared (final double x, final double z, final int sector)

Method distanceSquared.

Parameters:
final double x
final double z
final int sector

switch

public return switch (sector)

Method switch.

Parameters:
sector sector