Record Class PackResourceMetadata

java.lang.Object
java.lang.Record
net.minecraft.resource.metadata.PackResourceMetadata
Record Components:
description -
packFormat -
supportedFormats -

public record PackResourceMetadata(Text description, int packFormat, Optional<Range<Integer>> supportedFormats) extends Record
Mappings:
Namespace Name
named net/minecraft/resource/metadata/PackResourceMetadata
intermediary net/minecraft/class_3272
official ate
named description
intermediary comp_1580
official c
named packFormat
intermediary comp_1581
official d
named supportedFormats
intermediary comp_1582
official e
  • Field Details

    • description

      private final Text description
      The field for the description record component.
    • packFormat

      private final int packFormat
      The field for the packFormat record component.
    • supportedFormats

      private final Optional<Range<Integer>> supportedFormats
      The field for the supportedFormats record component.
    • CODEC

      public static final com.mojang.serialization.Codec<PackResourceMetadata> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/resource/metadata/PackResourceMetadata;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_45051 Lnet/minecraft/class_3272;field_45051:Lcom/mojang/serialization/Codec;
      official a Late;a:Lcom/mojang/serialization/Codec;
    • SERIALIZER

      public static final ResourceMetadataSerializer<PackResourceMetadata> SERIALIZER
      Mappings:
      Namespace Name Mixin selector
      named SERIALIZER Lnet/minecraft/resource/metadata/PackResourceMetadata;SERIALIZER:Lnet/minecraft/resource/metadata/ResourceMetadataSerializer;
      intermediary field_14202 Lnet/minecraft/class_3272;field_14202:Lnet/minecraft/class_7677;
      official b Late;b:Latd;
  • Constructor Details

    • PackResourceMetadata

      public PackResourceMetadata(Text description, int format, Optional<Range<Integer>> optional)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/resource/metadata/PackResourceMetadata;<init>(Lnet/minecraft/text/Text;ILjava/util/Optional;)V
      intermediary <init> Lnet/minecraft/class_3272;<init>(Lnet/minecraft/class_2561;ILjava/util/Optional;)V
      official <init> Late;<init>(Lwy;ILjava/util/Optional;)V
  • 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.
    • description

      public Text description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • packFormat

      public int packFormat()
      Returns the value of the packFormat record component.
      Returns:
      the value of the packFormat record component
    • supportedFormats

      public Optional<Range<Integer>> supportedFormats()
      Returns the value of the supportedFormats record component.
      Returns:
      the value of the supportedFormats record component