Package kr.toxicity.model.api.tracker
Interface ModelRotator.Getter
- Enclosing interface:
ModelRotator
public static interface ModelRotator.Getter
Functional interface for calculating rotation.
- Since:
- 1.15.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ModelRotator.GetterDefault getter returning the input rotation. -
Method Summary
Modifier and TypeMethodDescription@NotNull ModelRotationapply(@NotNull Tracker tracker, @NotNull ModelRotation modelRotation) Calculates the rotation.static @NotNull ModelRotator.Getterof(@NotNull Function<ModelRotation, ModelRotation> rotator) Creates a function-based rotation getter.static @NotNull ModelRotator.Getterof(@NotNull Supplier<ModelRotation> rotator) Creates a supplier-based rotation getter.static @NotNull ModelRotator.Getterof(@NotNull ModelRotation rotator) Creates a constant rotation getter.
-
Field Details
-
DEFAULT
Default getter returning the input rotation.- Since:
- 1.15.2
-
-
Method Details
-
apply
@NotNull @NotNull ModelRotation apply(@NotNull @NotNull Tracker tracker, @NotNull @NotNull ModelRotation modelRotation) Calculates the rotation.- Parameters:
tracker- the trackermodelRotation- the base rotation- Returns:
- the calculated rotation
- Since:
- 1.15.2
-
of
Creates a constant rotation getter.- Parameters:
rotator- the rotation- Returns:
- the getter
- Since:
- 1.15.2
-
of
Creates a supplier-based rotation getter.- Parameters:
rotator- the supplier- Returns:
- the getter
- Since:
- 1.15.2
-
of
@NotNull static @NotNull ModelRotator.Getter of(@NotNull @NotNull Function<ModelRotation, ModelRotation> rotator) Creates a function-based rotation getter.- Parameters:
rotator- the function- Returns:
- the getter
- Since:
- 1.15.2
-