Record Class TelemetryProperty<T>

java.lang.Object
java.lang.Record
net.minecraft.client.telemetry.TelemetryProperty<T>

public record TelemetryProperty<T>(String id, String exportKey, com.mojang.serialization.Codec<T> codec, TelemetryProperty.Exporter<T> exporter) extends Record
  • Field Details

  • Constructor Details

    • TelemetryProperty

      public TelemetryProperty(String id, String exportKey, com.mojang.serialization.Codec<T> codec, TelemetryProperty.Exporter<T> exporter)
      Creates an instance of a TelemetryProperty record class.
      Parameters:
      id - the value for the id record component
      exportKey - the value for the exportKey record component
      codec - the value for the codec record component
      exporter - the value for the exporter record component
  • Method Details

    • create

      public static <T> TelemetryProperty<T> create(String p_262052_, String p_261851_, com.mojang.serialization.Codec<T> p_261617_, TelemetryProperty.Exporter<T> p_261478_)
    • bool

      public static TelemetryProperty<Boolean> bool(String p_261605_, String p_262064_)
    • string

      public static TelemetryProperty<String> string(String p_261570_, String p_261611_)
    • integer

      public static TelemetryProperty<Integer> integer(String p_262077_, String p_261580_)
    • uuid

      public static TelemetryProperty<UUID> uuid(String p_261558_, String p_261707_)
    • longSamples

      public static TelemetryProperty<it.unimi.dsi.fastutil.longs.LongList> longSamples(String p_262055_, String p_261726_)
    • export

      public void export(TelemetryPropertyMap p_262111_, com.mojang.authlib.minecraft.TelemetryPropertyContainer p_262082_)
    • title

      public MutableComponent title()
    • toString

      public 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 o)
      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:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • exportKey

      public String exportKey()
      Returns the value of the exportKey record component.
      Returns:
      the value of the exportKey record component
    • codec

      public com.mojang.serialization.Codec<T> codec()
      Returns the value of the codec record component.
      Returns:
      the value of the codec record component
    • exporter

      public TelemetryProperty.Exporter<T> exporter()
      Returns the value of the exporter record component.
      Returns:
      the value of the exporter record component