Package dev.dhyces.compostbag.tooltip
Record Class ClientCompostBagTooltip
java.lang.Object
java.lang.Record
dev.dhyces.compostbag.tooltip.ClientCompostBagTooltip
- All Implemented Interfaces:
net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent
public record ClientCompostBagTooltip(int maxCount, int count, int maxLevel, int level)
extends Record
implements net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocation -
Constructor Summary
ConstructorsConstructorDescriptionClientCompostBagTooltip(int maxCount, int count, int maxLevel, int level) Creates an instance of aClientCompostBagTooltiprecord class.ClientCompostBagTooltip(CompostBagTooltip tooltip) -
Method Summary
Modifier and TypeMethodDescriptionintcount()Returns the value of thecountrecord component.final 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.intlevel()Returns the value of thelevelrecord component.intmaxCount()Returns the value of themaxCountrecord component.intmaxLevel()Returns the value of themaxLevelrecord component.voidrenderImage(net.minecraft.client.gui.Font font, int x, int y, net.minecraft.client.gui.GuiGraphics guiGraphics) voidrenderText(net.minecraft.client.gui.Font pFont, int pX, int pY, org.joml.Matrix4f pMatrix4f, net.minecraft.client.renderer.MultiBufferSource.BufferSource pBufferSource) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
TEXTURE_LOCATION
public static final net.minecraft.resources.ResourceLocation TEXTURE_LOCATION
-
-
Constructor Details
-
ClientCompostBagTooltip
-
ClientCompostBagTooltip
public ClientCompostBagTooltip(int maxCount, int count, int maxLevel, int level) Creates an instance of aClientCompostBagTooltiprecord class.- Parameters:
maxCount- the value for themaxCountrecord componentcount- the value for thecountrecord componentmaxLevel- the value for themaxLevelrecord componentlevel- the value for thelevelrecord 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
-
renderText
public void renderText(net.minecraft.client.gui.Font pFont, int pX, int pY, org.joml.Matrix4f pMatrix4f, net.minecraft.client.renderer.MultiBufferSource.BufferSource pBufferSource) - Specified by:
renderTextin 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
-
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 '=='. -
maxCount
public int maxCount()Returns the value of themaxCountrecord component.- Returns:
- the value of the
maxCountrecord component
-
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
maxLevel
public int maxLevel()Returns the value of themaxLevelrecord component.- Returns:
- the value of the
maxLevelrecord component
-
level
public int level()Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-