Record Class Pack.Info
java.lang.Object
java.lang.Record
net.minecraft.server.packs.repository.Pack.Info
- Enclosing class:
- Pack
public static record Pack.Info(Component description, PackCompatibility compatibility, FeatureFlagSet requestedFeatures, List<String> overlays, boolean hidden)
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 thehiddenrecord component.The field for theoverlaysrecord component.private final FeatureFlagSetThe field for therequestedFeaturesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionInfo(Component description, PackCompatibility compatibility, FeatureFlagSet requestedFeatures, List<String> overlays) Info(Component description, PackCompatibility compatibility, FeatureFlagSet requestedFeatures, List<String> overlays, boolean hidden) Creates an instance of aInforecord 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.booleanhidden()Returns the value of thehiddenrecord 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.
-
-
Constructor Details
-
Info
public Info(Component description, PackCompatibility compatibility, FeatureFlagSet requestedFeatures, List<String> overlays) -
Info
public Info(Component description, PackCompatibility compatibility, FeatureFlagSet requestedFeatures, List<String> overlays, boolean hidden) Creates an instance of aInforecord class.- Parameters:
description- the value for thedescriptionrecord componentcompatibility- the value for thecompatibilityrecord componentrequestedFeatures- the value for therequestedFeaturesrecord componentoverlays- the value for theoverlaysrecord componenthidden- the value for thehiddenrecord 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
-