Class Steering

java.lang.Object
com.hypixel.hytale.server.npc.movement.Steering

public class Steering extends Object
The steering class contains a desired direction and rotation. It is normally computed by a Motion subclass instance and used in a MotionController subclass to determine the movment of an NPC. The translation part is interpreted as directional vector with maximum unit length. A length of 1 represents 100% of maximum speed.
  • Field Details

    • DIRECTION_VECTOR_MIN_LENGTH_SQUARED

      public static final double DIRECTION_VECTOR_MIN_LENGTH_SQUARED
      See Also:
    • NULL

      public static final Steering NULL
  • Constructor Details

    • Steering

      public Steering()
  • Method Details

    • clear

      @Nonnull public Steering clear()
    • assign

      @Nonnull public Steering assign(@Nonnull Steering other)
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clearTranslation

      @Nonnull public Steering clearTranslation()
    • clearRotation

      @Nonnull public Steering clearRotation()
    • getTranslation

      @Nonnull public org.joml.Vector3d getTranslation()
    • getX

      public double getX()
    • setX

      @Nonnull public Steering setX(double value)
    • getY

      public double getY()
    • setY

      @Nonnull public Steering setY(double value)
    • getZ

      public double getZ()
    • setZ

      @Nonnull public Steering setZ(double value)
    • setTranslation

      @Nonnull public Steering setTranslation(@Nonnull org.joml.Vector3d translation)
    • setTranslation

      @Nonnull public Steering setTranslation(double x, double y, double z)
    • setTranslationRelativeSpeed

      @Nonnull public Steering setTranslationRelativeSpeed(double relativeSpeed)
    • scaleTranslation

      @Nonnull public Steering scaleTranslation(double speedFactor)
    • ensureMinTranslation

      @Nonnull public Steering ensureMinTranslation(double relativeSpeed)
    • getMaxDistance

      public double getMaxDistance()
    • setMaxDistance

      public void setMaxDistance(double maxDistance)
    • clearMaxDistance

      public void clearMaxDistance()
    • getMaxDistanceComponentSelector

      public org.joml.Vector3d getMaxDistanceComponentSelector()
    • setMaxDistanceComponentSelector

      public void setMaxDistanceComponentSelector(org.joml.Vector3d maxDistanceComponentSelector)
    • clearMaxDistanceComponentSelector

      public void clearMaxDistanceComponentSelector()
    • getYaw

      public float getYaw()
    • setYaw

      @Nonnull public Steering setYaw(float angle)
    • clearYaw

      public void clearYaw()
    • getPitch

      public float getPitch()
    • setPitch

      @Nonnull public Steering setPitch(float angle)
    • clearPitch

      public void clearPitch()
    • getRoll

      public float getRoll()
    • setRoll

      @Nonnull public Steering setRoll(float angle)
    • clearRoll

      public void clearRoll()
    • setRelativeTurnSpeed

      @Nonnull public Steering setRelativeTurnSpeed(double relativeTurnSpeed)
    • hasTranslation

      public boolean hasTranslation()
    • getDirectionHint

      @Nonnull public Rotation3f getDirectionHint()
    • hasDirectionHint

      public boolean hasDirectionHint()
    • setDirectionHint

      @Nonnull public Steering setDirectionHint(@Nonnull org.joml.Vector3d direction, @Nonnull Rotation3f rotation, boolean forceOverwrite)
    • setDirectionHint

      @Nonnull public Steering setDirectionHint(@Nonnull Rotation3f rotation)
    • setDirectionHint

      @Nonnull public Steering setDirectionHint(@Nonnull Rotation3f rotation, boolean forceOverwrite)
    • hasYaw

      public boolean hasYaw()
    • hasYawOrDirection

      public boolean hasYawOrDirection()
    • getYawOrDirection

      public float getYawOrDirection()
    • hasPitch

      public boolean hasPitch()
    • hasPitchOrDirection

      public boolean hasPitchOrDirection()
    • getPitchOrDirection

      public float getPitchOrDirection()
    • hasRoll

      public boolean hasRoll()
    • hasRollOrDirection

      public boolean hasRollOrDirection()
    • getRollOrDirection

      public float getRollOrDirection()
    • getSpeed

      public double getSpeed()
    • getRelativeTurnSpeed

      public double getRelativeTurnSpeed()
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object