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, int dataFormat, int resourceFormat, 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 int
The field for thedataFormat
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.private final int
The field for theresourceFormat
record component. -
Constructor Summary
ConstructorDescriptionInfo
(Component description, int dataFormat, int resourceFormat, 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.int
Returns the value of thedataFormat
record component.Returns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.int
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.int
Returns the value of theresourceFormat
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
description
The field for thedescription
record component. -
dataFormat
private final int dataFormatThe field for thedataFormat
record component. -
resourceFormat
private final int resourceFormatThe field for theresourceFormat
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, int dataFormat, int resourceFormat, PackCompatibility compatibility, FeatureFlagSet requestedFeatures, List<String> overlays, boolean isHidden) Creates an instance of aInfo
record class.- Parameters:
description
- the value for thedescription
record componentdataFormat
- the value for thedataFormat
record componentresourceFormat
- the value for theresourceFormat
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
-
getFormat
-
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
-
dataFormat
public int dataFormat()Returns the value of thedataFormat
record component.- Returns:
- the value of the
dataFormat
record component
-
resourceFormat
public int resourceFormat()Returns the value of theresourceFormat
record component.- Returns:
- the value of the
resourceFormat
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
-