Package net.minecraft.resource.metadata
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 official ammintermediary net/minecraft/class_3272named net/minecraft/resource/metadata/PackResourceMetadataofficial cintermediary comp_1580named descriptionofficial dintermediary comp_1581named packFormatofficial eintermediary comp_1582named supportedFormats
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PackResourceMetadata>private final TextThe field for thedescriptionrecord component.private final intThe field for thepackFormatrecord component.static final ResourceMetadataSerializer<PackResourceMetadata>The field for thesupportedFormatsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPackResourceMetadata(Text description, int format, Optional<Range<Integer>> optional) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thepackFormatrecord component.Returns the value of thesupportedFormatsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
description
The field for thedescriptionrecord component. -
packFormat
private final int packFormatThe field for thepackFormatrecord component. -
supportedFormats
The field for thesupportedFormatsrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector official aLamm;a:Lcom/mojang/serialization/Codec;intermediary field_45051Lnet/minecraft/class_3272;field_45051:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/resource/metadata/PackResourceMetadata;CODEC:Lcom/mojang/serialization/Codec;
-
SERIALIZER
- Mappings:
Namespace Name Mixin selector official bLamm;b:Laml;intermediary field_14202Lnet/minecraft/class_3272;field_14202:Lnet/minecraft/class_7677;named SERIALIZERLnet/minecraft/resource/metadata/PackResourceMetadata;SERIALIZER:Lnet/minecraft/resource/metadata/ResourceMetadataSerializer;
-
-
Constructor Details
-
PackResourceMetadata
- Mappings:
Namespace Name Mixin selector official <init>Lamm;<init>(Lte;ILjava/util/Optional;)Vintermediary <init>Lnet/minecraft/class_3272;<init>(Lnet/minecraft/class_2561;ILjava/util/Optional;)Vnamed <init>Lnet/minecraft/resource/metadata/PackResourceMetadata;<init>(Lnet/minecraft/text/Text;ILjava/util/Optional;)V
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
packFormat
public int packFormat()Returns the value of thepackFormatrecord component.- Returns:
- the value of the
packFormatrecord component
-
supportedFormats
Returns the value of thesupportedFormatsrecord component.- Returns:
- the value of the
supportedFormatsrecord component
-