Record Class ModelAnimator

java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelAnimator
Record Components:
name - the name of the bone group this animator affects
keyframes - the list of keyframes
_rotationGlobal - whether the rotation is applied globally (true) or locally (false/null)

@Internal public record ModelAnimator(@Nullable BoneName name, @Nullable List<ModelKeyframe> keyframes, @Nullable Boolean _rotationGlobal) extends Record
Represents a raw animator from a model file, containing a set of keyframes for a specific bone group.
Since:
1.15.2
  • Constructor Details

    • ModelAnimator

      public ModelAnimator(@Nullable @Nullable BoneName name, @Nullable @Nullable List<ModelKeyframe> keyframes, @Nullable @Nullable Boolean _rotationGlobal)
      Creates an instance of a ModelAnimator record class.
      Parameters:
      name - the value for the name record component
      keyframes - the value for the keyframes record component
      _rotationGlobal - the value for the _rotationGlobal record component
  • Method Details

    • rotationGlobal

      public boolean rotationGlobal()
      Checks if the rotation should be applied globally.
      Returns:
      true if rotation is global, false otherwise
      Since:
      1.15.2
    • isAvailable

      public boolean isAvailable()
      Checks if this animator is valid and has keyframes.
      Returns:
      true if available, false otherwise
      Since:
      1.15.2
    • isNotEmpty

      public boolean isNotEmpty()
      Checks if this animator contains any keyframes.
      Returns:
      true if not empty, false otherwise
      Since:
      1.15.2
    • name

      @NotNull public @NotNull BoneName name()
      Returns the name of the bone group this animator affects.
      Returns:
      the name of the bone group
    • keyframes

      @NotNull public @NotNull List<ModelKeyframe> keyframes()
      Returns the list of keyframes for this animator. If no keyframes are present, an empty list is returned.
      Returns:
      the list of keyframes
    • stream

      @NotNull public @NotNull Stream<ModelKeyframe> stream()
      Returns a sorted stream of valid keyframes.
      Returns:
      the stream of keyframes
      Since:
      1.15.2
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • _rotationGlobal

      @Nullable @SerializedName("rotation_global") public @Nullable Boolean _rotationGlobal()
      Returns the value of the _rotationGlobal record component.
      Returns:
      the value of the _rotationGlobal record component