Record Class DataTracker.SerializedEntry<T>

java.lang.Object
java.lang.Record
net.minecraft.entity.data.DataTracker.SerializedEntry<T>
Record Components:
id -
handler -
value -
Enclosing class:
DataTracker

public static record DataTracker.SerializedEntry<T>(int id, TrackedDataHandler<T> handler, T value) extends Record
Mappings:
Namespace Name
named net/minecraft/entity/data/DataTracker$SerializedEntry
intermediary net/minecraft/class_2945$class_7834
official alg$c
named id
intermediary comp_1115
official a
named handler
intermediary comp_1116
official b
named value
intermediary comp_1117
official c
  • Field Details

    • id

      private final int id
      The field for the id record component.
    • handler

      private final TrackedDataHandler<T> handler
      The field for the handler record component.
    • value

      private final T value
      The field for the value record component.
  • Constructor Details

    • SerializedEntry

      public SerializedEntry(int int2, TrackedDataHandler<T> trackedDataHandler, T t)
  • Method Details

    • of

      public static <T> DataTracker.SerializedEntry<T> of(TrackedData<T> data, T value)
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/entity/data/DataTracker$SerializedEntry;of(Lnet/minecraft/entity/data/TrackedData;Ljava/lang/Object;)Lnet/minecraft/entity/data/DataTracker$SerializedEntry;
      intermediary method_46360 Lnet/minecraft/class_2945$class_7834;method_46360(Lnet/minecraft/class_2940;Ljava/lang/Object;)Lnet/minecraft/class_2945$class_7834;
      official a Lalg$c;a(Lalc;Ljava/lang/Object;)Lalg$c;
    • write

      public void write(RegistryByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      named write Lnet/minecraft/entity/data/DataTracker$SerializedEntry;write(Lnet/minecraft/network/RegistryByteBuf;)V
      intermediary method_46361 Lnet/minecraft/class_2945$class_7834;method_46361(Lnet/minecraft/class_9129;)V
      official a Lalg$c;a(Lxg;)V
    • fromBuf

      public static DataTracker.SerializedEntry<?> fromBuf(RegistryByteBuf buf, int id)
      Mappings:
      Namespace Name Mixin selector
      named fromBuf Lnet/minecraft/entity/data/DataTracker$SerializedEntry;fromBuf(Lnet/minecraft/network/RegistryByteBuf;I)Lnet/minecraft/entity/data/DataTracker$SerializedEntry;
      intermediary method_46362 Lnet/minecraft/class_2945$class_7834;method_46362(Lnet/minecraft/class_9129;I)Lnet/minecraft/class_2945$class_7834;
      official a Lalg$c;a(Lxg;I)Lalg$c;
    • fromBuf

      private static <T> DataTracker.SerializedEntry<T> fromBuf(RegistryByteBuf buf, int id, TrackedDataHandler<T> handler)
      Mappings:
      Namespace Name Mixin selector
      named fromBuf Lnet/minecraft/entity/data/DataTracker$SerializedEntry;fromBuf(Lnet/minecraft/network/RegistryByteBuf;ILnet/minecraft/entity/data/TrackedDataHandler;)Lnet/minecraft/entity/data/DataTracker$SerializedEntry;
      intermediary method_46363 Lnet/minecraft/class_2945$class_7834;method_46363(Lnet/minecraft/class_9129;ILnet/minecraft/class_2941;)Lnet/minecraft/class_2945$class_7834;
      official a Lalg$c;a(Lxg;ILald;)Lalg$c;
    • 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.
    • id

      public int id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • handler

      public TrackedDataHandler<T> handler()
      Returns the value of the handler record component.
      Returns:
      the value of the handler record component
    • value

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