Record Class KeyframeTrack<T>
java.lang.Object
java.lang.Record
net.minecraft.util.KeyframeTrack<T>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EasingTypeThe field for theeasingTyperecord component.The field for thekeyframesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionKeyframeTrack(List<Keyframe<T>> keyframes, EasingType easingType) Creates an instance of aKeyframeTrackrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbakeSampler(Optional<Integer> periodTicks, LerpFunction<T> lerp) Returns the value of theeasingTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thekeyframesrecord component.static <T> com.mojang.serialization.MapCodec<KeyframeTrack<T>> mapCodec(com.mojang.serialization.Codec<T> valueCodec) final StringtoString()Returns a string representation of this record class.validateKeyframes(List<Keyframe<T>> keyframes) static com.mojang.serialization.DataResult<KeyframeTrack<?>> validatePeriod(KeyframeTrack<?> track, int periodTicks)
-
Field Details
-
keyframes
-
easingType
The field for theeasingTyperecord component.
-
-
Constructor Details
-
KeyframeTrack
Creates an instance of aKeyframeTrackrecord class.- Parameters:
keyframes- the value for thekeyframesrecord componenteasingType- the value for theeasingTyperecord component
-
-
Method Details
-
mapCodec
public static <T> com.mojang.serialization.MapCodec<KeyframeTrack<T>> mapCodec(com.mojang.serialization.Codec<T> valueCodec) -
validateKeyframes
-
validatePeriod
public static com.mojang.serialization.DataResult<KeyframeTrack<?>> validatePeriod(KeyframeTrack<?> track, int periodTicks) -
bakeSampler
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
keyframes
-
easingType
Returns the value of theeasingTyperecord component.- Returns:
- the value of the
easingTyperecord component
-