Class MotionControllerDive

java.lang.Object
com.hypixel.hytale.server.npc.movement.controllers.MotionControllerBase
com.hypixel.hytale.server.npc.movement.controllers.MotionControllerDive
All Implemented Interfaces:
MotionController, DebugSupport.DebugFlagsChangeListener

public class MotionControllerDive extends MotionControllerBase
  • Field Details

  • Constructor Details

  • Method Details

    • activate

      public void activate()
      Specified by:
      activate in interface MotionController
      Overrides:
      activate in class MotionControllerBase
    • getWanderVerticalMovementRatio

      public double getWanderVerticalMovementRatio()
    • getDesiredVerticalRange

      @Nonnull public MotionController.VerticalRange getDesiredVerticalRange(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • setMotionKind

      public void setMotionKind(MotionKind motionKind)
      Overrides:
      setMotionKind in class MotionControllerBase
    • constrainRotations

      public void constrainRotations(Role role, @Nonnull TransformComponent transform)
    • getCurrentMaxBodyRotationSpeed

      public double getCurrentMaxBodyRotationSpeed()
    • canSteer

      public boolean canSteer(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Specified by:
      canSteer in interface MotionController
      Overrides:
      canSteer in class MotionControllerBase
    • inAir

      public boolean inAir()
    • inWater

      public boolean inWater()
    • onGround

      public boolean onGround()
    • getType

      @Nonnull public String getType()
    • getSupportedMovementModes

      @Nonnull public Set<MovementMode> getSupportedMovementModes()
    • getDefaultSpawnMovementModes

      @Nonnull public Set<MovementMode> getDefaultSpawnMovementModes()
    • bisect

      public double bisect(@Nonnull Ref<EntityStore> ref, @Nonnull org.joml.Vector3d validPosition, double validDistance, @Nonnull org.joml.Vector3d invalidPosition, double invalidDistance, @Nonnull org.joml.Vector3d result, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Bisect using PositionProbeWater#probePosition predicate
      Parameters:
      ref - The entity reference of the entity
      validPosition - Initial valid position
      validDistance - Initial factor
      invalidPosition - Final invalid position
      invalidDistance - Final factor
      result - Iterated valid position closer to final position
      componentAccessor - The component accessor for component access
      Returns:
      lerp(standard_bisect_result, initial_factor, invalid_factor)
    • bisect

      public double bisect(@Nonnull Ref<EntityStore> ref, @Nonnull org.joml.Vector3d validPosition, @Nonnull org.joml.Vector3d invalidPosition, @Nonnull org.joml.Vector3d result, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Bisect using PositionProbeWater#probePosition predicate
      Parameters:
      ref - The entity reference of the entity
      validPosition - Initial valid position
      invalidPosition - Final invalid position
      result - Iterated valid position closer to final position
      componentAccessor - The component accessor for component access
      Returns:
      Factor so that lerp(factor, validPosition, invalidPosition) equals result
    • probeMove

      public double probeMove(@Nonnull Ref<EntityStore> ref, @Nonnull ProbeMoveData probeMoveData, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • spawned

      public void spawned()
    • getCurrentSpeed

      public double getCurrentSpeed()
    • getCurrentTurnRadius

      public double getCurrentTurnRadius()
    • getMaxClimbAngle

      public float getMaxClimbAngle()
    • getMaxSinkAngle

      public float getMaxSinkAngle()
    • getMaximumSpeed

      public double getMaximumSpeed()
    • isFastMotionKind

      public boolean isFastMotionKind(double speed)
    • is2D

      public boolean is2D()
    • canRestAtPlace

      public boolean canRestAtPlace()
    • getDesiredAltitudeWeight

      public double getDesiredAltitudeWeight()
    • getHeightOverGround

      public double getHeightOverGround()
    • estimateVelocity

      public boolean estimateVelocity(Steering steering, @Nonnull org.joml.Vector3d velocityOut)
    • updateModelParameters

      public void updateModelParameters(Ref<EntityStore> ref, Model model, @Nonnull Box boundingBox, ComponentAccessor<EntityStore> componentAccessor)
      Specified by:
      updateModelParameters in interface MotionController
      Overrides:
      updateModelParameters in class MotionControllerBase
    • relativeSwimDepthToBoundingBox

      public static double relativeSwimDepthToBoundingBox(double swimDepth, @Nullable Box boundingBox, float eyeHeight)
    • relativeSwimDepthToHeight

      public static double relativeSwimDepthToHeight(double swimDepth, @Nullable Box boundingBox, float eyeHeight)
    • relativeSwimDepthToHeight

      public static double relativeSwimDepthToHeight(@Nullable Ref<EntityStore> ref, double swimDepth, Model model, Box boundingBox, @Nullable ComponentAccessor<EntityStore> componentAccessor)
    • getDampingDeceleration

      public double getDampingDeceleration()