Record Class Pack.Metadata
java.lang.Object
java.lang.Record
net.minecraft.server.packs.repository.Pack.Metadata
- Enclosing class:
Pack
public static record Pack.Metadata(Component description, PackCompatibility compatibility, FeatureFlagSet requestedFeatures, List<String> overlays, boolean isHidden)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PackCompatibilityThe field for thecompatibilityrecord component.private final ComponentThe field for thedescriptionrecord component.private final booleanThe field for theisHiddenrecord component.The field for theoverlaysrecord component.private final FeatureFlagSetThe field for therequestedFeaturesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMetadata(Component description, PackCompatibility compatibility, FeatureFlagSet requestedFeatures, List<String> overlays) Deprecated.Metadata(Component description, PackCompatibility compatibility, FeatureFlagSet requestedFeatures, List<String> overlays, boolean isHidden) Creates an instance of aMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecompatibilityrecord component.Returns 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.booleanisHidden()Returns the value of theisHiddenrecord component.overlays()Returns the value of theoverlaysrecord component.Returns the value of therequestedFeaturesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
description
The field for thedescriptionrecord component. -
compatibility
The field for thecompatibilityrecord component. -
requestedFeatures
The field for therequestedFeaturesrecord component. -
overlays
The field for theoverlaysrecord component. -
isHidden
private final boolean isHiddenThe field for theisHiddenrecord component.
-
-
Constructor Details
-
Metadata
@Deprecated public Metadata(Component description, PackCompatibility compatibility, FeatureFlagSet requestedFeatures, List<String> overlays) Deprecated.Neo: useMetadata(Component,PackCompatibility,FeatureFlagSet,List,boolean)instead -
Metadata
public Metadata(Component description, PackCompatibility compatibility, FeatureFlagSet requestedFeatures, List<String> overlays, boolean isHidden) Creates an instance of aMetadatarecord class.- Parameters:
description- the value for thedescriptionrecord componentcompatibility- the value for thecompatibilityrecord componentrequestedFeatures- the value for therequestedFeaturesrecord componentoverlays- the value for theoverlaysrecord componentisHidden- the value for theisHiddenrecord component
-
-
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
-
compatibility
Returns the value of thecompatibilityrecord component.- Returns:
- the value of the
compatibilityrecord component
-
requestedFeatures
Returns the value of therequestedFeaturesrecord component.- Returns:
- the value of the
requestedFeaturesrecord component
-
overlays
Returns the value of theoverlaysrecord component.- Returns:
- the value of the
overlaysrecord component
-
isHidden
public boolean isHidden()Returns the value of theisHiddenrecord component.- Returns:
- the value of the
isHiddenrecord component
-
Metadata(Component,PackCompatibility,FeatureFlagSet,List,boolean)instead