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
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thedataFormatrecord component.private final ComponentThe field for thedescriptionrecord component.private final booleanThe field for thehiddenrecord component.private final FeatureFlagSetThe field for therequestedFeaturesrecord component.private final intThe field for theresourceFormatrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionInfo(Component description, int dataFormat, int resourceFormat, FeatureFlagSet requestedFeatures, boolean hidden) Creates an instance of aInforecord class.Info(Component description, int format, FeatureFlagSet requestedFeatures) -
Method Summary
Modifier and TypeMethodDescriptioncompatibility(PackType p_249204_) intReturns the value of thedataFormatrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.intfinal inthashCode()Returns a hash code value for this object.booleanhidden()Returns the value of thehiddenrecord component.Returns the value of therequestedFeaturesrecord component.intReturns the value of theresourceFormatrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
description
The field for thedescriptionrecord component. -
dataFormat
private final int dataFormatThe field for thedataFormatrecord component. -
resourceFormat
private final int resourceFormatThe field for theresourceFormatrecord component. -
requestedFeatures
The field for therequestedFeaturesrecord component.
-
-
Constructor Details
-
Info
-
Info
public Info(Component description, int dataFormat, int resourceFormat, FeatureFlagSet requestedFeatures, boolean hidden) Creates an instance of aInforecord class.- Parameters:
description- the value for thedescriptionrecord componentdataFormat- the value for thedataFormatrecord componentresourceFormat- the value for theresourceFormatrecord componentrequestedFeatures- the value for therequestedFeaturesrecord componenthidden- the value for thehiddenrecord 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 thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
dataFormat
public int dataFormat()Returns the value of thedataFormatrecord component.- Returns:
- the value of the
dataFormatrecord component
-
resourceFormat
public int resourceFormat()Returns the value of theresourceFormatrecord component.- Returns:
- the value of the
resourceFormatrecord component
-
requestedFeatures
Returns the value of therequestedFeaturesrecord component.- Returns:
- the value of the
requestedFeaturesrecord component
-