Record Class AnimationFrame
java.lang.Object
java.lang.Record
net.minecraft.client.resources.metadata.animation.AnimationFrame
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<AnimationFrame> static final com.mojang.serialization.Codec<AnimationFrame> private final intThe field for theindexrecord component.The field for thetimerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAnimationFrame(int index) AnimationFrame(int index, Optional<Integer> time) Creates an instance of aAnimationFramerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.time()Returns the value of thetimerecord component.inttimeOr(int defaultFrameTime) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
index
private final int indexThe field for theindexrecord component. -
time
-
FULL_CODEC
-
CODEC
-
-
Constructor Details
-
AnimationFrame
public AnimationFrame(int index) -
AnimationFrame
-
-
Method Details
-
timeOr
public int timeOr(int defaultFrameTime) -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
time
-