Record Class ResourceMetadataSerializer<T>

java.lang.Object
java.lang.Record
net.minecraft.resource.metadata.ResourceMetadataSerializer<T>
Record Components:
name -
codec -

public record ResourceMetadataSerializer<T>(String name, com.mojang.serialization.Codec<T> codec) extends Record
Mappings:
Namespace Name
named net/minecraft/resource/metadata/ResourceMetadataSerializer
intermediary net/minecraft/class_7677
official azo
named name
intermediary comp_3436
official a
named codec
intermediary comp_3437
official b
  • Field Details

    • name

      private final String name
      The field for the name record component.
    • codec

      private final com.mojang.serialization.Codec<T> codec
      The field for the codec record component.
  • Constructor Details

    • ResourceMetadataSerializer

      public ResourceMetadataSerializer(String string, com.mojang.serialization.Codec<T> codec)
  • Method Details

    • value

      public ResourceMetadataSerializer.Value<T> value(T value)
      Mappings:
      Namespace Name Mixin selector
      named value Lnet/minecraft/resource/metadata/ResourceMetadataSerializer;value(Ljava/lang/Object;)Lnet/minecraft/resource/metadata/ResourceMetadataSerializer$Value;
      intermediary method_72316 Lnet/minecraft/class_7677;method_72316(Ljava/lang/Object;)Lnet/minecraft/class_7677$class_11554;
      official a Lazo;a(Ljava/lang/Object;)Lazo$a;
    • 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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name 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