Record Class Track<T>

java.lang.Object
java.lang.Record
net.minecraft.world.attribute.timeline.Track<T>
Record Components:
keyframes -
easingType -

public record Track<T>(List<Keyframe<T>> keyframes, EasingType easingType) extends Record
Mappings:
Namespace Name
named net/minecraft/world/attribute/timeline/Track
intermediary net/minecraft/class_12306
official bgb
named keyframes
intermediary comp_5204
official a
named easingType
intermediary comp_5205
official b
  • Field Details

  • Constructor Details

    • Track

      public Track(List<Keyframe<T>> keyframes, EasingType easingType)
      Creates an instance of a Track record class.
      Parameters:
      keyframes - the value for the keyframes record component
      easingType - the value for the easingType record component
  • Method Details

    • createCodec

      public static <T> com.mojang.serialization.MapCodec<Track<T>> createCodec(com.mojang.serialization.Codec<T> valueCodec)
      Mappings:
      Namespace Name Mixin selector
      named createCodec Lnet/minecraft/world/attribute/timeline/Track;createCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/MapCodec;
      intermediary method_76377 Lnet/minecraft/class_12306;method_76377(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/MapCodec;
      official a Lbgb;a(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/MapCodec;
    • validateKeyframes

      static <T> com.mojang.serialization.DataResult<List<Keyframe<T>>> validateKeyframes(List<Keyframe<T>> keyframes)
      Mappings:
      Namespace Name Mixin selector
      named validateKeyframes Lnet/minecraft/world/attribute/timeline/Track;validateKeyframes(Ljava/util/List;)Lcom/mojang/serialization/DataResult;
      intermediary method_76379 Lnet/minecraft/class_12306;method_76379(Ljava/util/List;)Lcom/mojang/serialization/DataResult;
      official a Lbgb;a(Ljava/util/List;)Lcom/mojang/serialization/DataResult;
    • validateKeyframesInPeriod

      public static com.mojang.serialization.DataResult<Track<?>> validateKeyframesInPeriod(Track<?> track, int period)
      Mappings:
      Namespace Name Mixin selector
      named validateKeyframesInPeriod Lnet/minecraft/world/attribute/timeline/Track;validateKeyframesInPeriod(Lnet/minecraft/world/attribute/timeline/Track;I)Lcom/mojang/serialization/DataResult;
      intermediary method_76376 Lnet/minecraft/class_12306;method_76376(Lnet/minecraft/class_12306;I)Lcom/mojang/serialization/DataResult;
      official a Lbgb;a(Lbgb;I)Lcom/mojang/serialization/DataResult;
    • createEvaluator

      public TrackEvaluator<T> createEvaluator(Optional<Integer> period, Interpolator<T> interpolator)
      Mappings:
      Namespace Name Mixin selector
      named createEvaluator Lnet/minecraft/world/attribute/timeline/Track;createEvaluator(Ljava/util/Optional;Lnet/minecraft/util/math/Interpolator;)Lnet/minecraft/world/attribute/timeline/TrackEvaluator;
      intermediary method_76380 Lnet/minecraft/class_12306;method_76380(Ljava/util/Optional;Lnet/minecraft/class_12210;)Lnet/minecraft/class_12308;
      official a Lbgb;a(Ljava/util/Optional;Lceg;)Lbgc;
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • keyframes

      public List<Keyframe<T>> keyframes()
      Returns the value of the keyframes record component.
      Returns:
      the value of the keyframes record component
    • easingType

      public EasingType easingType()
      Returns the value of the easingType record component.
      Returns:
      the value of the easingType record component