Record Class TrackEvaluator.Segment<T>

java.lang.Object
java.lang.Record
net.minecraft.world.attribute.timeline.TrackEvaluator.Segment<T>
Record Components:
easing -
fromValue -
fromTicks -
toValue -
toTicks -
Enclosing class:
TrackEvaluator<T>

private static record TrackEvaluator.Segment<T>(EasingType easing, T fromValue, int fromTicks, T toValue, int toTicks) extends Record
Mappings:
Namespace Name
named net/minecraft/world/attribute/timeline/TrackEvaluator$Segment
intermediary net/minecraft/class_12308$class_12309
official bgc$a
named easing
intermediary comp_5206
official a
named fromValue
intermediary comp_5207
official b
named fromTicks
intermediary comp_5208
official c
named toValue
intermediary comp_5209
official d
named toTicks
intermediary comp_5210
official e
  • Field Details

    • easing

      private final EasingType easing
      The field for the easing record component.
    • fromValue

      private final T fromValue
      The field for the fromValue record component.
    • fromTicks

      private final int fromTicks
      The field for the fromTicks record component.
    • toValue

      private final T toValue
      The field for the toValue record component.
    • toTicks

      private final int toTicks
      The field for the toTicks record component.
  • Constructor Details

    • Segment

      public Segment(Track<T> track, Keyframe<T> fromKeyframe, int fromTicks, Keyframe<T> toKeyframe, int toTicks)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/world/attribute/timeline/TrackEvaluator$Segment;<init>(Lnet/minecraft/world/attribute/timeline/Track;Lnet/minecraft/world/attribute/timeline/Keyframe;ILnet/minecraft/world/attribute/timeline/Keyframe;I)V
      intermediary <init> Lnet/minecraft/class_12308$class_12309;<init>(Lnet/minecraft/class_12306;Lnet/minecraft/class_12305;ILnet/minecraft/class_12305;I)V
      official <init> Lbgc$a;<init>(Lbgb;Lbga;ILbga;I)V
    • Segment

      Segment(EasingType easing, T fromValue, int fromTicks, T toValue, int toTicks)
      Creates an instance of a Segment record class.
      Parameters:
      easing - the value for the easing record component
      fromValue - the value for the fromValue record component
      fromTicks - the value for the fromTicks record component
      toValue - the value for the toValue record component
      toTicks - the value for the toTicks record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • easing

      public EasingType easing()
      Returns the value of the easing record component.
      Returns:
      the value of the easing record component
    • fromValue

      public T fromValue()
      Returns the value of the fromValue record component.
      Returns:
      the value of the fromValue record component
    • fromTicks

      public int fromTicks()
      Returns the value of the fromTicks record component.
      Returns:
      the value of the fromTicks record component
    • toValue

      public T toValue()
      Returns the value of the toValue record component.
      Returns:
      the value of the toValue record component
    • toTicks

      public int toTicks()
      Returns the value of the toTicks record component.
      Returns:
      the value of the toTicks record component