Class EntityBodyRotator

java.lang.Object
kr.toxicity.model.api.tracker.EntityBodyRotator

public final class EntityBodyRotator extends Object
Manages the body and head rotation logic for an entity tracker.

This class handles the complex interactions between body yaw, head yaw, and pitch, including smoothing, clamping, and player-specific behaviors.

Since:
1.15.2
  • Method Details

    • lockRotation

      public boolean lockRotation(boolean lock)
      Locks or unlocks the rotation updates.
      Parameters:
      lock - true to lock, false to unlock
      Returns:
      true if the state changed
      Since:
      1.15.2
    • setValue

      public void setValue(@NotNull @NotNull Consumer<EntityBodyRotator.RotatorData> consumer)
      Configures the rotator using a consumer.
      Parameters:
      consumer - the configuration consumer
      Since:
      1.15.2
    • reset

      public void reset()
      Resets the rotator to default settings.
      Since:
      1.15.2