Record Class CommonClientEvents.ItemTooltips.TooltipContext
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.client.core.CommonClientEvents.ItemTooltips.TooltipContext
- Enclosing class:
CommonClientEvents.ItemTooltips
public static record CommonClientEvents.ItemTooltips.TooltipContext(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.Item.TooltipContext tooltip, net.minecraft.world.item.component.TooltipDisplay display, net.minecraft.client.player.LocalPlayer player, net.minecraft.world.item.TooltipFlag flag, Consumer<net.minecraft.network.chat.Component> builder)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionTooltipContext(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.Item.TooltipContext tooltip, net.minecraft.world.item.component.TooltipDisplay display, net.minecraft.client.player.LocalPlayer player, net.minecraft.world.item.TooltipFlag flag, Consumer<net.minecraft.network.chat.Component> builder) Creates an instance of aTooltipContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionConsumer<net.minecraft.network.chat.Component> builder()Returns the value of thebuilderrecord component.net.minecraft.world.item.component.TooltipDisplaydisplay()Returns the value of thedisplayrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.item.TooltipFlagflag()Returns the value of theflagrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.client.player.LocalPlayerplayer()Returns the value of theplayerrecord component.net.minecraft.world.item.ItemStackstack()Returns the value of thestackrecord component.net.minecraft.world.item.Item.TooltipContexttooltip()Returns the value of thetooltiprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TooltipContext
public TooltipContext(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.Item.TooltipContext tooltip, net.minecraft.world.item.component.TooltipDisplay display, net.minecraft.client.player.LocalPlayer player, net.minecraft.world.item.TooltipFlag flag, Consumer<net.minecraft.network.chat.Component> builder) Creates an instance of aTooltipContextrecord class.- Parameters:
stack- the value for thestackrecord componenttooltip- the value for thetooltiprecord componentdisplay- the value for thedisplayrecord componentplayer- the value for theplayerrecord componentflag- the value for theflagrecord componentbuilder- the value for thebuilderrecord 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). -
stack
public net.minecraft.world.item.ItemStack stack()Returns the value of thestackrecord component.- Returns:
- the value of the
stackrecord component
-
tooltip
public net.minecraft.world.item.Item.TooltipContext tooltip()Returns the value of thetooltiprecord component.- Returns:
- the value of the
tooltiprecord component
-
display
public net.minecraft.world.item.component.TooltipDisplay display()Returns the value of thedisplayrecord component.- Returns:
- the value of the
displayrecord component
-
player
public net.minecraft.client.player.LocalPlayer player()Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-
flag
public net.minecraft.world.item.TooltipFlag flag()Returns the value of theflagrecord component.- Returns:
- the value of the
flagrecord component
-
builder
Returns the value of thebuilderrecord component.- Returns:
- the value of the
builderrecord component
-