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 isHidden)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final PackCompatibility
The field for thecompatibility
record component.private final Component
The field for thedescription
record component.private final boolean
The field for theisHidden
record component.The field for theoverlays
record component.private final FeatureFlagSet
The field for therequestedFeatures
record component. -
Constructor Summary
ConstructorDescriptionInfo
(Component description, PackCompatibility compatibility, FeatureFlagSet requestedFeatures, List<String> overlays, boolean isHidden) Creates an instance of aInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecompatibility
record component.Returns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
isHidden()
Returns the value of theisHidden
record component.overlays()
Returns the value of theoverlays
record component.Returns the value of therequestedFeatures
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
description
The field for thedescription
record component. -
compatibility
The field for thecompatibility
record component. -
requestedFeatures
The field for therequestedFeatures
record component. -
overlays
The field for theoverlays
record component. -
isHidden
private final boolean isHiddenThe field for theisHidden
record component.
-
-
Constructor Details
-
Info
public Info(Component description, PackCompatibility compatibility, FeatureFlagSet requestedFeatures, List<String> overlays, boolean isHidden) Creates an instance of aInfo
record class.- Parameters:
description
- the value for thedescription
record componentcompatibility
- the value for thecompatibility
record componentrequestedFeatures
- the value for therequestedFeatures
record componentoverlays
- the value for theoverlays
record componentisHidden
- the value for theisHidden
record 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 thedescription
record component.- Returns:
- the value of the
description
record component
-
compatibility
Returns the value of thecompatibility
record component.- Returns:
- the value of the
compatibility
record component
-
requestedFeatures
Returns the value of therequestedFeatures
record component.- Returns:
- the value of the
requestedFeatures
record component
-
overlays
Returns the value of theoverlays
record component.- Returns:
- the value of the
overlays
record component
-
isHidden
public boolean isHidden()Returns the value of theisHidden
record component.- Returns:
- the value of the
isHidden
record component
-