Interface ModelRotator.Getter

Enclosing interface:
ModelRotator

public static interface ModelRotator.Getter
Functional interface for calculating rotation.
Since:
1.15.2
  • Field Details

    • DEFAULT

      static final ModelRotator.Getter 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 tracker
      modelRotation - the base rotation
      Returns:
      the calculated rotation
      Since:
      1.15.2
    • of

      @NotNull static @NotNull ModelRotator.Getter of(@NotNull @NotNull ModelRotation rotator)
      Creates a constant rotation getter.
      Parameters:
      rotator - the rotation
      Returns:
      the getter
      Since:
      1.15.2
    • of

      @NotNull static @NotNull ModelRotator.Getter of(@NotNull @NotNull Supplier<ModelRotation> rotator)
      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