Record Class HelpTooltipComponent
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.api.support.HelpTooltipComponent
- Record Components:
text- the help text
- All Implemented Interfaces:
net.minecraft.world.inventory.tooltip.TooltipComponent
@API(status=STABLE,
since="2.0.0-milestone.2.12")
public record HelpTooltipComponent(net.minecraft.network.chat.Component text)
extends Record
implements net.minecraft.world.inventory.tooltip.TooltipComponent
Return this in
Item.getTooltipImage(ItemStack) to provide a help tooltip.-
Constructor Summary
ConstructorsConstructorDescriptionHelpTooltipComponent(net.minecraft.network.chat.Component text) Creates an instance of aHelpTooltipComponentrecord class. -
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.net.minecraft.network.chat.Componenttext()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HelpTooltipComponent
public HelpTooltipComponent(net.minecraft.network.chat.Component text) Creates an instance of aHelpTooltipComponentrecord class.- Parameters:
text- the value for thetextrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
text
-