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 int
The field for theindex
record component.The field for thetime
record component. -
Constructor Summary
ConstructorsConstructorDescriptionAnimationFrame
(int p_119004_) AnimationFrame
(int index, Optional<Integer> time) Creates an instance of aAnimationFrame
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
index()
Returns the value of theindex
record component.time()
Returns the value of thetime
record component.int
timeOr
(int p_389658_) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
index
private final int indexThe field for theindex
record component. -
time
The field for thetime
record component. -
FULL_CODEC
-
CODEC
-
-
Constructor Details
-
AnimationFrame
public AnimationFrame(int p_119004_) -
AnimationFrame
Creates an instance of aAnimationFrame
record class.- Parameters:
index
- the value for theindex
record componenttime
- the value for thetime
record component
-
-
Method Details
-
timeOr
public int timeOr(int p_389658_) -
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 '=='. -
index
public int index()Returns the value of theindex
record component.- Returns:
- the value of the
index
record component
-
time
Returns the value of thetime
record component.- Returns:
- the value of the
time
record component
-