Package kr.toxicity.model.api.data.raw
Record Class ModelAnimation
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelAnimation
- Record Components:
name- nameloop- whether to loopoverride- overrideuuid- uuidlength- keyframe lengthanimators- animators
@Internal
public record ModelAnimation(@NotNull String name, AnimationIterator.Type loop, boolean override, @NotNull String uuid, float length, @Nullable Map<String,ModelAnimator> animators)
extends Record
Raw animation of a model.
-
Constructor Summary
ConstructorsConstructorDescriptionModelAnimation(@NotNull String name, AnimationIterator.Type loop, boolean override, @NotNull String uuid, float length, @Nullable Map<String, ModelAnimator> animators) Creates an instance of aModelAnimationrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Map<String, ModelAnimator> Returns the value of theanimatorsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatlength()Returns the value of thelengthrecord component.loop()Returns the value of thelooprecord component.@NotNull Stringname()Returns the value of thenamerecord component.booleanoverride()Returns the value of theoverriderecord component.@NotNull BlueprintAnimationtoBlueprint(@NotNull List<BlueprintChildren> children, @NotNull ModelPlaceholder placeholder) Converts raw animation to blueprint animationfinal StringtoString()Returns a string representation of this record class.@NotNull Stringuuid()Returns the value of theuuidrecord component.
-
Constructor Details
-
ModelAnimation
public ModelAnimation(@NotNull @NotNull String name, @Nullable AnimationIterator.Type loop, boolean override, @NotNull @NotNull String uuid, float length, @Nullable @Nullable Map<String, ModelAnimator> animators) Creates an instance of aModelAnimationrecord class.- Parameters:
name- the value for thenamerecord componentloop- the value for thelooprecord componentoverride- the value for theoverriderecord componentuuid- the value for theuuidrecord componentlength- the value for thelengthrecord componentanimators- the value for theanimatorsrecord component
-
-
Method Details
-
toBlueprint
@NotNull public @NotNull BlueprintAnimation toBlueprint(@NotNull @NotNull List<BlueprintChildren> children, @NotNull @NotNull ModelPlaceholder placeholder) Converts raw animation to blueprint animation- Parameters:
children- childrenplaceholder- placeholder- Returns:
- converted animation
-
loop
Returns the value of thelooprecord component.- Returns:
- the value of the
looprecord component
-
animators
Returns the value of theanimatorsrecord component.- Returns:
- the value of the
animatorsrecord component
-
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. -
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. -
equals
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
override
public boolean override()Returns the value of theoverriderecord component.- Returns:
- the value of the
overriderecord component
-
uuid
Returns the value of theuuidrecord component.- Returns:
- the value of the
uuidrecord component
-
length
public float length()Returns the value of thelengthrecord component.- Returns:
- the value of the
lengthrecord component
-