Record Class TooltipFlag.Default

java.lang.Object
java.lang.Record
net.minecraft.world.item.TooltipFlag.Default
All Implemented Interfaces:
TooltipFlag
Enclosing interface:
TooltipFlag

public static record TooltipFlag.Default(boolean advanced, boolean creative) extends Record implements TooltipFlag
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.world.item.TooltipFlag

    TooltipFlag.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final boolean
    The field for the advanced record component.
    private final boolean
    The field for the creative record component.

    Fields inherited from interface net.minecraft.world.item.TooltipFlag

    ADVANCED, NORMAL
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default(boolean advanced, boolean creative)
    Creates an instance of a Default record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the advanced record component.
     
    boolean
    Returns the value of the creative record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
     
    boolean
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • advanced

      private final boolean advanced
      The field for the advanced record component.
    • creative

      private final boolean creative
      The field for the creative record component.
  • Constructor Details

    • Default

      public Default(boolean advanced, boolean creative)
      Creates an instance of a Default record class.
      Parameters:
      advanced - the value for the advanced record component
      creative - the value for the creative record component
  • Method Details

    • isAdvanced

      public boolean isAdvanced()
      Specified by:
      isAdvanced in interface TooltipFlag
    • isCreative

      public boolean isCreative()
      Specified by:
      isCreative in interface TooltipFlag
    • asCreative

      public TooltipFlag.Default asCreative()
    • 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. All components in this record class 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.
    • advanced

      public boolean advanced()
      Returns the value of the advanced record component.
      Returns:
      the value of the advanced record component
    • creative

      public boolean creative()
      Returns the value of the creative record component.
      Returns:
      the value of the creative record component