Record Class AnimationMetadataSection
java.lang.Object
java.lang.Record
net.minecraft.client.resources.metadata.animation.AnimationMetadataSection
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<AnimationMetadataSection> private final int
The field for thedefaultFrameTime
record component.The field for theframeHeight
record component.private final Optional
<List<AnimationFrame>> The field for theframes
record component.The field for theframeWidth
record component.private final boolean
The field for theinterpolatedFrames
record component.static final MetadataSectionType
<AnimationMetadataSection> -
Constructor Summary
ConstructorsConstructorDescriptionAnimationMetadataSection
(Optional<List<AnimationFrame>> frames, Optional<Integer> frameWidth, Optional<Integer> frameHeight, int defaultFrameTime, boolean interpolatedFrames) Creates an instance of aAnimationMetadataSection
record class. -
Method Summary
Modifier and TypeMethodDescriptioncalculateFrameSize
(int p_249859_, int p_250148_) int
Returns the value of thedefaultFrameTime
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theframeHeight
record component.frames()
Returns the value of theframes
record component.Returns the value of theframeWidth
record component.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theinterpolatedFrames
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
frames
The field for theframes
record component. -
frameWidth
The field for theframeWidth
record component. -
frameHeight
The field for theframeHeight
record component. -
defaultFrameTime
private final int defaultFrameTimeThe field for thedefaultFrameTime
record component. -
interpolatedFrames
private final boolean interpolatedFramesThe field for theinterpolatedFrames
record component. -
CODEC
-
TYPE
-
-
Constructor Details
-
AnimationMetadataSection
public AnimationMetadataSection(Optional<List<AnimationFrame>> frames, Optional<Integer> frameWidth, Optional<Integer> frameHeight, int defaultFrameTime, boolean interpolatedFrames) Creates an instance of aAnimationMetadataSection
record class.- Parameters:
frames
- the value for theframes
record componentframeWidth
- the value for theframeWidth
record componentframeHeight
- the value for theframeHeight
record componentdefaultFrameTime
- the value for thedefaultFrameTime
record componentinterpolatedFrames
- the value for theinterpolatedFrames
record component
-
-
Method Details
-
calculateFrameSize
-
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 '=='. -
frames
Returns the value of theframes
record component.- Returns:
- the value of the
frames
record component
-
frameWidth
Returns the value of theframeWidth
record component.- Returns:
- the value of the
frameWidth
record component
-
frameHeight
Returns the value of theframeHeight
record component.- Returns:
- the value of the
frameHeight
record component
-
defaultFrameTime
public int defaultFrameTime()Returns the value of thedefaultFrameTime
record component.- Returns:
- the value of the
defaultFrameTime
record component
-
interpolatedFrames
public boolean interpolatedFrames()Returns the value of theinterpolatedFrames
record component.- Returns:
- the value of the
interpolatedFrames
record component
-