Package net.minecraft.world.item
Record Class CreativeModeTab.ItemDisplayParameters
java.lang.Object
java.lang.Record
net.minecraft.world.item.CreativeModeTab.ItemDisplayParameters
- Enclosing class:
CreativeModeTab
public static record CreativeModeTab.ItemDisplayParameters(FeatureFlagSet enabledFeatures, boolean hasPermissions, HolderLookup.Provider holders)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FeatureFlagSetThe field for theenabledFeaturesrecord component.private final booleanThe field for thehasPermissionsrecord component.private final HolderLookup.ProviderThe field for theholdersrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionItemDisplayParameters(FeatureFlagSet enabledFeatures, boolean hasPermissions, HolderLookup.Provider holders) Creates an instance of aItemDisplayParametersrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theenabledFeaturesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasPermissionsrecord component.holders()Returns the value of theholdersrecord component.booleanneedsUpdate(FeatureFlagSet p_270338_, boolean p_270835_, HolderLookup.Provider p_270575_) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
enabledFeatures
The field for theenabledFeaturesrecord component. -
hasPermissions
private final boolean hasPermissionsThe field for thehasPermissionsrecord component. -
holders
The field for theholdersrecord component.
-
-
Constructor Details
-
ItemDisplayParameters
public ItemDisplayParameters(FeatureFlagSet enabledFeatures, boolean hasPermissions, HolderLookup.Provider holders) Creates an instance of aItemDisplayParametersrecord class.- Parameters:
enabledFeatures- the value for theenabledFeaturesrecord componenthasPermissions- the value for thehasPermissionsrecord componentholders- the value for theholdersrecord component
-
-
Method Details
-
needsUpdate
public boolean needsUpdate(FeatureFlagSet p_270338_, boolean p_270835_, HolderLookup.Provider p_270575_) -
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 '=='. -
enabledFeatures
Returns the value of theenabledFeaturesrecord component.- Returns:
- the value of the
enabledFeaturesrecord component
-
hasPermissions
public boolean hasPermissions()Returns the value of thehasPermissionsrecord component.- Returns:
- the value of the
hasPermissionsrecord component
-
holders
Returns the value of theholdersrecord component.- Returns:
- the value of the
holdersrecord component
-