Package net.minecraft.util
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 max)
-
Field Details
-
keyframes
The field for thekeyframesrecord component. -
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 max) -
bakeSampler
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
keyframes
Returns the value of thekeyframesrecord component.- Returns:
- the value of the
keyframesrecord component
-
easingType
Returns the value of theeasingTyperecord component.- Returns:
- the value of the
easingTyperecord component
-