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, FeatureFlagSet requestedFeatures, boolean hidden)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for thedataFormat
record component.private final Component
The field for thedescription
record component.private final boolean
The field for thehidden
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, FeatureFlagSet requestedFeatures, boolean hidden) Creates an instance of aInfo
record class.Info
(Component description, int format, FeatureFlagSet requestedFeatures) -
Method Summary
Modifier and TypeMethodDescriptioncompatibility
(PackType p_249204_) 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
hidden()
Returns the value of thehidden
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. -
requestedFeatures
The field for therequestedFeatures
record component.
-
-
Constructor Details
-
Info
-
Info
public Info(Component description, int dataFormat, int resourceFormat, FeatureFlagSet requestedFeatures, boolean hidden) 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 componentrequestedFeatures
- the value for therequestedFeatures
record componenthidden
- the value for thehidden
record component
-
-
Method Details
-
getFormat
-
compatibility
-
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
-
requestedFeatures
Returns the value of therequestedFeatures
record component.- Returns:
- the value of the
requestedFeatures
record component
-