Record Class CustomTooltipTest.CustomClientTooltip
java.lang.Object
java.lang.Record
net.neoforged.neoforge.oldtest.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.CustomTooltipThe field for thetooltiprecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aCustomClientTooltiprecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intintfinal inthashCode()Returns a hash code value for this object.voidrenderImage(Font font, int x, int y, GuiGraphics graphics) tooltip()Returns the value of thetooltiprecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent
renderText
-
Field Details
-
tooltip
The field for thetooltiprecord component.
-
-
Constructor Details
-
CustomClientTooltip
CustomClientTooltip(CustomTooltipTest.CustomTooltip tooltip) Creates an instance of aCustomClientTooltiprecord class.- Parameters:
tooltip- the value for thetooltiprecord component
-
-
Method Details
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceClientTooltipComponent
-
getWidth
- Specified by:
getWidthin interfaceClientTooltipComponent
-
renderImage
- Specified by:
renderImagein 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 thetooltiprecord component.- Returns:
- the value of the
tooltiprecord component
-