Package net.minecraft.client.animation
Record Class Keyframe
java.lang.Object
java.lang.Record
net.minecraft.client.animation.Keyframe
public record Keyframe(float timestamp, org.joml.Vector3f target, AnimationChannel.Interpolation interpolation)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final AnimationChannel.Interpolation
The field for theinterpolation
record component.private final org.joml.Vector3f
The field for thetarget
record component.private final float
The field for thetimestamp
record component. -
Constructor Summary
ConstructorDescriptionKeyframe
(float timestamp, org.joml.Vector3f target, AnimationChannel.Interpolation interpolation) Creates an instance of aKeyframe
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.Returns the value of theinterpolation
record component.org.joml.Vector3f
target()
Returns the value of thetarget
record component.float
Returns the value of thetimestamp
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
timestamp
private final float timestampThe field for thetimestamp
record component. -
target
private final org.joml.Vector3f targetThe field for thetarget
record component. -
interpolation
The field for theinterpolation
record component.
-
-
Constructor Details
-
Keyframe
public Keyframe(float timestamp, org.joml.Vector3f target, AnimationChannel.Interpolation interpolation) Creates an instance of aKeyframe
record class.- Parameters:
timestamp
- the value for thetimestamp
record componenttarget
- the value for thetarget
record componentinterpolation
- the value for theinterpolation
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 '=='. -
timestamp
public float timestamp()Returns the value of thetimestamp
record component.- Returns:
- the value of the
timestamp
record component
-
target
public org.joml.Vector3f target()Returns the value of thetarget
record component.- Returns:
- the value of the
target
record component
-
interpolation
Returns the value of theinterpolation
record component.- Returns:
- the value of the
interpolation
record component
-