Class EntityBodyRotator
java.lang.Object
kr.toxicity.model.api.tracker.EntityBodyRotator
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfiguration data for the entity body rotator. -
Method Summary
Modifier and TypeMethodDescriptionbooleanlockRotation(boolean lock) Locks or unlocks the rotation updates.voidreset()Resets the rotator to default settings.voidsetValue(@NotNull Consumer<EntityBodyRotator.RotatorData> consumer) Configures the rotator using a consumer.
-
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
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
-