Package net.minecraft.world.item
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
Modifier and TypeFieldDescriptionprivate final boolean
The field for theadvanced
record component.private final boolean
The field for thecreative
record component.Fields inherited from interface net.minecraft.world.item.TooltipFlag
ADVANCED, NORMAL
-
Constructor Summary
ConstructorDescriptionDefault
(boolean advanced, boolean creative) Creates an instance of aDefault
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
advanced()
Returns the value of theadvanced
record component.boolean
creative()
Returns the value of thecreative
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
boolean
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
advanced
private final boolean advancedThe field for theadvanced
record component. -
creative
private final boolean creativeThe field for thecreative
record component.
-
-
Constructor Details
-
Default
public Default(boolean advanced, boolean creative) Creates an instance of aDefault
record class.- Parameters:
advanced
- the value for theadvanced
record componentcreative
- the value for thecreative
record component
-
-
Method Details
-
isAdvanced
public boolean isAdvanced()- Specified by:
isAdvanced
in interfaceTooltipFlag
-
isCreative
public boolean isCreative()- Specified by:
isCreative
in interfaceTooltipFlag
-
asCreative
-
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. All components in this record class are compared with '=='. -
advanced
public boolean advanced()Returns the value of theadvanced
record component.- Returns:
- the value of the
advanced
record component
-
creative
public boolean creative()Returns the value of thecreative
record component.- Returns:
- the value of the
creative
record component
-