SourcedRotator

Implementation of a chained rotator.

Since

1.15.2

Parameters

source

source rotator

delegate

delegated rotator

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
@NotNull
val DEFAULT: @NotNull ModelRotator
Default rotator (applies rotation as-is).
Link copied to clipboard
The global deserializer instance for rotators.
Link copied to clipboard
@NotNull
val EMPTY: @NotNull ModelRotator
Empty rotator (returns zero rotation).
Link copied to clipboard
@NotNull
val PITCH: @NotNull ModelRotator
Pitch-only rotator.
Link copied to clipboard
@NotNull
val YAW: @NotNull ModelRotator
Yaw-only rotator.

Functions

Link copied to clipboard
open fun <V> andThen(after: (in R) -> out V): BiFunction<T, U, V>
Link copied to clipboard
abstract fun apply(p: T, p1: U): R

@NotNull
open fun apply(@NotNull tracker: @NotNull Tracker): @NotNull ModelRotation
Applies the rotator to a tracker with default rotation.
@NotNull
open fun apply(@NotNull tracker: @NotNull Tracker, @NotNull rotation: @NotNull ModelRotation): @NotNull ModelRotation
Applies the rotator to a tracker with a base rotation.
Link copied to clipboard
@Nullable
open fun data(): @Nullable JsonElement
Returns the configuration data for this rotator.
Link copied to clipboard
@NotNull
open fun deserialize(@NotNull object: @NotNull JsonObject): @NotNull ModelRotator
Deserializes a rotator from a JSON object.
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
@NotNull
open fun lazy(mills: Long): @NotNull ModelRotator
Creates a lazy rotator that smooths rotation over time.
Link copied to clipboard
@NotNull
open fun name(): @NotNull String
Returns the name of this rotator type.
Link copied to clipboard
@NotNull
open fun root(): @NotNull ModelRotator
Returns the root rotator in the chain.
Link copied to clipboard
@NotNull
open fun serialize(): @NotNull JsonObject
Serializes this rotator to a JSON object.
Link copied to clipboard
@Nullable
abstract fun source(): @Nullable ModelRotator
Returns the source rotator if this is a chained rotator.
Link copied to clipboard
@NotNull
open fun then(@NotNull rotator: @NotNull ModelRotator): @NotNull ModelRotator
Chains this rotator with another one.
Link copied to clipboard
abstract fun toString(): String