Record Class PackMetadataSection
java.lang.Object
java.lang.Record
net.minecraft.server.packs.metadata.pack.PackMetadataSection
public record PackMetadataSection(Component description, int packFormat, Optional<InclusiveRange<Integer>> supportedFormats, Optional<PackMetadataSection.NeoForgeData> neoForgeData)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PackMetadataSection>private final ComponentThe field for thedescriptionrecord component.private final Optional<PackMetadataSection.NeoForgeData>The field for theneoForgeDatarecord component.private final intDeprecated.private final Optional<InclusiveRange<Integer>>The field for thesupportedFormatsrecord component.static final MetadataSectionType<PackMetadataSection> -
Constructor Summary
ConstructorsConstructorDescriptionPackMetadataSection(Component description, int packVersion) PackMetadataSection(Component p_10371_, int p_10372_, Map<PackType, Integer> packTypeVersions) PackMetadataSection(Component description, int packFormat, Optional<InclusiveRange<Integer>> supportedFormats) Deprecated.PackMetadataSection(Component description, int packFormat, Optional<InclusiveRange<Integer>> supportedFormats, Optional<PackMetadataSection.NeoForgeData> neoForgeData) Creates an instance of aPackMetadataSectionrecord class.PackMetadataSection(Component description, int packFormat, PackMetadataSection.NeoForgeData neoForgeData) PackMetadataSection(Component description, int packFormat, InclusiveRange<Integer> supportedFormats) -
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.Returns the value of theneoForgeDatarecord component.intDeprecated.intpackFormat(PackType packType) 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
Deprecated.The field for thepackFormatrecord component. -
supportedFormats
The field for thesupportedFormatsrecord component. -
neoForgeData
The field for theneoForgeDatarecord component. -
CODEC
-
TYPE
-
-
Constructor Details
-
PackMetadataSection
@Deprecated public PackMetadataSection(Component description, int packFormat, Optional<InclusiveRange<Integer>> supportedFormats) Deprecated. -
PackMetadataSection
public PackMetadataSection(Component description, int packFormat, InclusiveRange<Integer> supportedFormats) -
PackMetadataSection
public PackMetadataSection(Component description, int packFormat, PackMetadataSection.NeoForgeData neoForgeData) -
PackMetadataSection
-
PackMetadataSection
-
PackMetadataSection
public PackMetadataSection(Component description, @Deprecated int packFormat, Optional<InclusiveRange<Integer>> supportedFormats, Optional<PackMetadataSection.NeoForgeData> neoForgeData) Creates an instance of aPackMetadataSectionrecord class.- Parameters:
description- the value for thedescriptionrecord componentpackFormat- the value for thepackFormatrecord componentsupportedFormats- the value for thesupportedFormatsrecord componentneoForgeData- the value for theneoForgeDatarecord component
-
-
Method Details
-
packFormat
-
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
Deprecated.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
-
neoForgeData
Returns the value of theneoForgeDatarecord component.- Returns:
- the value of the
neoForgeDatarecord component
-