Record Class PackMetadataSection
java.lang.Object
java.lang.Record
net.minecraft.server.packs.metadata.pack.PackMetadataSection
public record PackMetadataSection(Component description, InclusiveRange<PackFormat> supportedFormats)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MetadataSectionType<PackMetadataSection> private final ComponentThe field for thedescriptionrecord component.private static final com.mojang.serialization.Codec<PackMetadataSection> static final MetadataSectionType<PackMetadataSection> static final MetadataSectionType<PackMetadataSection> private final InclusiveRange<PackFormat> The field for thesupportedFormatsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPackMetadataSection(Component description, InclusiveRange<PackFormat> supportedFormats) Creates an instance of aPackMetadataSectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionprivate static com.mojang.serialization.Codec<PackMetadataSection> codecForPackType(PackType packType) Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.forPackType(PackType packType) final inthashCode()Returns a hash code value for this object.Returns the value of thesupportedFormatsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
description
The field for thedescriptionrecord component. -
supportedFormats
The field for thesupportedFormatsrecord component. -
FALLBACK_CODEC
-
CLIENT_TYPE
-
SERVER_TYPE
-
FALLBACK_TYPE
-
-
Constructor Details
-
PackMetadataSection
Creates an instance of aPackMetadataSectionrecord class.- Parameters:
description- the value for thedescriptionrecord componentsupportedFormats- the value for thesupportedFormatsrecord component
-
-
Method Details
-
codecForPackType
private static com.mojang.serialization.Codec<PackMetadataSection> codecForPackType(PackType packType) -
forPackType
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
supportedFormats
Returns the value of thesupportedFormatsrecord component.- Returns:
- the value of the
supportedFormatsrecord component
-