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 named net/minecraft/resource/metadata/PackResourceMetadata
intermediary net/minecraft/class_3272
official atq
named description
intermediary comp_1580
official c
named packFormat
intermediary comp_1581
official d
named supportedFormats
intermediary comp_1582
official e
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<PackResourceMetadata> private final Text
The field for thedescription
record component.private final int
The field for thepackFormat
record component.static final ResourceMetadataSerializer
<PackResourceMetadata> The field for thesupportedFormats
record component. -
Constructor Summary
ConstructorDescriptionPackResourceMetadata
(Text description, int format, Optional<Range<Integer>> optional) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of thepackFormat
record component.Returns the value of thesupportedFormats
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
description
The field for thedescription
record component. -
packFormat
private final int packFormatThe field for thepackFormat
record component. -
supportedFormats
The field for thesupportedFormats
record component. -
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
Latq;a:Lcom/mojang/serialization/Codec;
-
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
Latq;b:Latp;
-
-
Constructor Details
-
PackResourceMetadata
- 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>
Latq;<init>(Lxp;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 thedescription
record component.- Returns:
- the value of the
description
record component
-
packFormat
public int packFormat()Returns the value of thepackFormat
record component.- Returns:
- the value of the
packFormat
record component
-
supportedFormats
Returns the value of thesupportedFormats
record component.- Returns:
- the value of the
supportedFormats
record component
-