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 Details

    • enabledFeatures

      private final FeatureFlagSet enabledFeatures
      The field for the enabledFeatures record component.
    • hasPermissions

      private final boolean hasPermissions
      The field for the hasPermissions record component.
    • holders

      private final HolderLookup.Provider holders
      The field for the holders record component.
  • Constructor Details

    • ItemDisplayParameters

      public ItemDisplayParameters(FeatureFlagSet enabledFeatures, boolean hasPermissions, HolderLookup.Provider holders)
      Creates an instance of a ItemDisplayParameters record class.
      Parameters:
      enabledFeatures - the value for the enabledFeatures record component
      hasPermissions - the value for the hasPermissions record component
      holders - the value for the holders record component
  • Method Details

    • needsUpdate

      public boolean needsUpdate(FeatureFlagSet p_270338_, boolean p_270835_, HolderLookup.Provider p_270575_)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • enabledFeatures

      public FeatureFlagSet enabledFeatures()
      Returns the value of the enabledFeatures record component.
      Returns:
      the value of the enabledFeatures record component
    • hasPermissions

      public boolean hasPermissions()
      Returns the value of the hasPermissions record component.
      Returns:
      the value of the hasPermissions record component
    • holders

      public HolderLookup.Provider holders()
      Returns the value of the holders record component.
      Returns:
      the value of the holders record component