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 enabledFeatures, boolean hasPermissions, HolderLookup.Provider holders) 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 enabledFeatures, boolean hasPermissions, HolderLookup.Provider holders) -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
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
-