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
Modifier and TypeFieldDescriptionprivate final FeatureFlagSet
The field for theenabledFeatures
record component.private final boolean
The field for thehasPermissions
record component.private final HolderLookup.Provider
The field for theholders
record component. -
Constructor Summary
ConstructorDescriptionItemDisplayParameters
(FeatureFlagSet enabledFeatures, boolean hasPermissions, HolderLookup.Provider holders) Creates an instance of aItemDisplayParameters
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theenabledFeatures
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of thehasPermissions
record component.holders()
Returns the value of theholders
record component.boolean
needsUpdate
(FeatureFlagSet p_270338_, boolean p_270835_, HolderLookup.Provider p_270575_) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
enabledFeatures
The field for theenabledFeatures
record component. -
hasPermissions
private final boolean hasPermissionsThe field for thehasPermissions
record component. -
holders
The field for theholders
record component.
-
-
Constructor Details
-
ItemDisplayParameters
public ItemDisplayParameters(FeatureFlagSet enabledFeatures, boolean hasPermissions, HolderLookup.Provider holders) Creates an instance of aItemDisplayParameters
record class.- Parameters:
enabledFeatures
- the value for theenabledFeatures
record componenthasPermissions
- the value for thehasPermissions
record componentholders
- the value for theholders
record 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 theenabledFeatures
record component.- Returns:
- the value of the
enabledFeatures
record component
-
hasPermissions
public boolean hasPermissions()Returns the value of thehasPermissions
record component.- Returns:
- the value of the
hasPermissions
record component
-
holders
Returns the value of theholders
record component.- Returns:
- the value of the
holders
record component
-