Package net.minecraft.client.animation
Record Class AnimationDefinition
java.lang.Object
java.lang.Record
net.minecraft.client.animation.AnimationDefinition
public record AnimationDefinition(float lengthInSeconds, boolean looping, Map<String,List<AnimationChannel>> boneAnimations)
extends Record
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map
<String, List<AnimationChannel>> The field for theboneAnimations
record component.private final float
The field for thelengthInSeconds
record component.private final boolean
The field for thelooping
record component. -
Constructor Summary
ConstructorDescriptionAnimationDefinition
(float lengthInSeconds, boolean looping, Map<String, List<AnimationChannel>> boneAnimations) Creates an instance of aAnimationDefinition
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theboneAnimations
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.float
Returns the value of thelengthInSeconds
record component.boolean
looping()
Returns the value of thelooping
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
lengthInSeconds
private final float lengthInSecondsThe field for thelengthInSeconds
record component. -
looping
private final boolean loopingThe field for thelooping
record component. -
boneAnimations
The field for theboneAnimations
record component.
-
-
Constructor Details
-
AnimationDefinition
public AnimationDefinition(float lengthInSeconds, boolean looping, Map<String, List<AnimationChannel>> boneAnimations) Creates an instance of aAnimationDefinition
record class.- Parameters:
lengthInSeconds
- the value for thelengthInSeconds
record componentlooping
- the value for thelooping
record componentboneAnimations
- the value for theboneAnimations
record component
-
-
Method Details
-
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 '=='. -
lengthInSeconds
public float lengthInSeconds()Returns the value of thelengthInSeconds
record component.- Returns:
- the value of the
lengthInSeconds
record component
-
looping
public boolean looping()Returns the value of thelooping
record component.- Returns:
- the value of the
looping
record component
-
boneAnimations
Returns the value of theboneAnimations
record component.- Returns:
- the value of the
boneAnimations
record component
-