Record Class Keyframe
java.lang.Object
java.lang.Record
net.minecraft.client.animation.Keyframe
public record Keyframe(float timestamp, Vector3fc preTarget, Vector3fc postTarget, AnimationChannel.Interpolation interpolation)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AnimationChannel.InterpolationThe field for theinterpolationrecord component.private final Vector3fcThe field for thepostTargetrecord component.private final Vector3fcThe field for thepreTargetrecord component.private final floatThe field for thetimestamprecord component. -
Constructor Summary
ConstructorsConstructorDescriptionKeyframe(float timestamp, Vector3fc postTarget, AnimationChannel.Interpolation interpolation) Keyframe(float timestamp, Vector3fc preTarget, Vector3fc postTarget, AnimationChannel.Interpolation interpolation) Creates an instance of aKeyframerecord 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.Returns the value of theinterpolationrecord component.Returns the value of thepostTargetrecord component.Returns the value of thepreTargetrecord component.floatReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
timestamp
private final float timestampThe field for thetimestamprecord component. -
preTarget
The field for thepreTargetrecord component. -
postTarget
The field for thepostTargetrecord component. -
interpolation
The field for theinterpolationrecord component.
-
-
Constructor Details
-
Keyframe
public Keyframe(float timestamp, Vector3fc postTarget, AnimationChannel.Interpolation interpolation) -
Keyframe
public Keyframe(float timestamp, Vector3fc preTarget, Vector3fc postTarget, AnimationChannel.Interpolation interpolation) Creates an instance of aKeyframerecord class.- Parameters:
timestamp- the value for thetimestamprecord componentpreTarget- the value for thepreTargetrecord componentpostTarget- the value for thepostTargetrecord componentinterpolation- the value for theinterpolationrecord component
-
-
Method Details
-
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. -
timestamp
public float timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
preTarget
Returns the value of thepreTargetrecord component.- Returns:
- the value of the
preTargetrecord component
-
postTarget
Returns the value of thepostTargetrecord component.- Returns:
- the value of the
postTargetrecord component
-
interpolation
Returns the value of theinterpolationrecord component.- Returns:
- the value of the
interpolationrecord component
-