Record Class CyclingItemsClientTooltipComponent
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.client.tooltip.CyclingItemsClientTooltipComponent
- All Implemented Interfaces:
net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCyclingItemsClientTooltipComponent(List<net.minecraft.world.item.ItemStack> stacks) Creates an instance of aCyclingItemsClientTooltipComponentrecord class.CyclingItemsClientTooltipComponent(CyclingItemsClientTooltipComponent.Image tooltipComponent) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intintgetWidth(net.minecraft.client.gui.Font font) final inthashCode()Returns a hash code value for this object.static final voidonRegisterTooltipComponentFactories(net.neoforged.neoforge.client.event.RegisterClientTooltipComponentFactoriesEvent event) voidrenderImage(net.minecraft.client.gui.Font font, int x, int y, net.minecraft.client.gui.GuiGraphics guiGraphics) List<net.minecraft.world.item.ItemStack> stacks()Returns the value of thestacksrecord 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
-
Constructor Details
-
CyclingItemsClientTooltipComponent
public CyclingItemsClientTooltipComponent(CyclingItemsClientTooltipComponent.Image tooltipComponent) -
CyclingItemsClientTooltipComponent
Creates an instance of aCyclingItemsClientTooltipComponentrecord class.- Parameters:
stacks- the value for thestacksrecord component
-
-
Method Details
-
getHeight
public int getHeight()- Specified by:
getHeightin interfacenet.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent
-
getWidth
public int getWidth(net.minecraft.client.gui.Font font) - Specified by:
getWidthin interfacenet.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent
-
renderImage
public void renderImage(net.minecraft.client.gui.Font font, int x, int y, net.minecraft.client.gui.GuiGraphics guiGraphics) - Specified by:
renderImagein interfacenet.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent
-
onRegisterTooltipComponentFactories
public static final void onRegisterTooltipComponentFactories(net.neoforged.neoforge.client.event.RegisterClientTooltipComponentFactoriesEvent event) -
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). -
stacks
Returns the value of thestacksrecord component.- Returns:
- the value of the
stacksrecord component
-