Package net.minecraftforge.debug.client
Record Class CustomTooltipTest.CustomClientTooltip
java.lang.Object
java.lang.Record
net.minecraftforge.debug.client.CustomTooltipTest.CustomClientTooltip
- All Implemented Interfaces:
ClientTooltipComponent
- Enclosing class:
- CustomTooltipTest
static record CustomTooltipTest.CustomClientTooltip(CustomTooltipTest.CustomTooltip tooltip)
extends Record
implements ClientTooltipComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CustomTooltipTest.CustomTooltip
The field for thetooltip
record component. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aCustomClientTooltip
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.int
int
final int
hashCode()
Returns a hash code value for this object.void
renderImage
(Font font, int x, int y, GuiGraphics graphics) tooltip()
Returns the value of thetooltip
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent
renderText
-
Field Details
-
tooltip
The field for thetooltip
record component.
-
-
Constructor Details
-
CustomClientTooltip
CustomClientTooltip(CustomTooltipTest.CustomTooltip tooltip) Creates an instance of aCustomClientTooltip
record class.- Parameters:
tooltip
- the value for thetooltip
record component
-
-
Method Details
-
getHeight
public int getHeight()- Specified by:
getHeight
in interfaceClientTooltipComponent
-
getWidth
- Specified by:
getWidth
in interfaceClientTooltipComponent
-
renderImage
- Specified by:
renderImage
in interfaceClientTooltipComponent
-
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 withObjects::equals(Object,Object)
. -
tooltip
Returns the value of thetooltip
record component.- Returns:
- the value of the
tooltip
record component
-