Record Class EnchantTooltip.Empty
java.lang.Object
java.lang.Record
johnsmith.enchantingoverhauled.client.gui.tooltip.enchant.EnchantTooltip.Empty
- All Implemented Interfaces:
EnchantTooltip
- Enclosing interface:
EnchantTooltip
Tooltip Command: Empty implementation used as a null object pattern when an invalid
or empty widget is hovered. Returns false to indicate no tooltip was drawn.
-
Nested Class Summary
Nested classes/interfaces inherited from interface johnsmith.enchantingoverhauled.client.gui.tooltip.enchant.EnchantTooltip
EnchantTooltip.Apply, EnchantTooltip.Empty, EnchantTooltip.Maxed, EnchantTooltip.MissingSource, EnchantTooltip.Transfer, EnchantTooltip.Upgrade -
Field Summary
Fields inherited from interface johnsmith.enchantingoverhauled.client.gui.tooltip.enchant.EnchantTooltip
GALACTIC_FONT_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanrender(net.minecraft.client.gui.GuiGraphics context, int mouseX, int mouseY) Executes the tooltip rendering logic.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Empty
public Empty()Creates an instance of aEmptyrecord class.
-
-
Method Details
-
render
public boolean render(net.minecraft.client.gui.GuiGraphics context, int mouseX, int mouseY) Description copied from interface:EnchantTooltipExecutes the tooltip rendering logic.- Specified by:
renderin interfaceEnchantTooltip- Parameters:
context- The graphics context to render to.mouseX- The current X position of the mouse pointer.mouseY- The current Y position of the mouse pointer.- Returns:
- true if the tooltip was rendered, false if this command is empty.
-
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.
-