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)
extends Record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PackMetadataSection>private final ComponentThe field for thedescriptionrecord component.private final intThe field for thepackFormatrecord component.private final Optional<InclusiveRange<Integer>>The field for thesupportedFormatsrecord component.static final MetadataSectionType<PackMetadataSection>
- 
Constructor SummaryConstructorsConstructorDescriptionPackMetadataSection(Component description, int packVersion) PackMetadataSection(Component description, int packFormat, Optional<InclusiveRange<Integer>> supportedFormats) Creates an instance of aPackMetadataSectionrecord class.
- 
Method SummaryModifier 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- 
descriptionThe field for thedescriptionrecord component.
- 
packFormatprivate final int packFormatThe field for thepackFormatrecord component.
- 
supportedFormatsThe field for thesupportedFormatsrecord component.
- 
CODEC
- 
TYPE
 
- 
- 
Constructor Details- 
PackMetadataSection
- 
PackMetadataSectionpublic PackMetadataSection(Component description, int packFormat, Optional<InclusiveRange<Integer>> supportedFormats) Creates an instance of aPackMetadataSectionrecord class.- Parameters:
- description- the value for the- descriptionrecord component
- packFormat- the value for the- packFormatrecord component
- supportedFormats- the value for the- supportedFormatsrecord component
 
 
- 
- 
Method Details- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
descriptionReturns the value of thedescriptionrecord component.- Returns:
- the value of the descriptionrecord component
 
- 
packFormatpublic int packFormat()Returns the value of thepackFormatrecord component.- Returns:
- the value of the packFormatrecord component
 
- 
supportedFormatsReturns the value of thesupportedFormatsrecord component.- Returns:
- the value of the supportedFormatsrecord component
 
 
-