Interface AttributeTooltipContext

All Superinterfaces:
net.minecraft.world.item.Item.TooltipContext

public interface AttributeTooltipContext extends net.minecraft.world.item.Item.TooltipContext
Extended Item.TooltipContext used when generating attribute tooltips.
  • Field Summary

    Fields inherited from interface net.minecraft.world.item.Item.TooltipContext

    EMPTY
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.item.TooltipFlag
    Returns the current tooltip flag.
    of(@Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.item.Item.TooltipContext itemCtx, net.minecraft.world.item.component.TooltipDisplay tooltipDisplay, net.minecraft.world.item.TooltipFlag flag)
     
    @Nullable net.minecraft.world.entity.player.Player
    Returns the player for whom tooltips are being generated for, if known.
    net.minecraft.world.item.component.TooltipDisplay
    Returns the tooltip display.

    Methods inherited from interface net.minecraft.world.item.Item.TooltipContext

    level, mapData, registries, tickRate
  • Method Details

    • player

      @Nullable @Nullable net.minecraft.world.entity.player.Player player()
      Returns the player for whom tooltips are being generated for, if known.
      Returns:
      the player for whom tooltips are being generated for, if known
    • tooltipDisplay

      net.minecraft.world.item.component.TooltipDisplay tooltipDisplay()
      Returns the tooltip display.
      Returns:
      the tooltip display
    • flag

      net.minecraft.world.item.TooltipFlag flag()
      Returns the current tooltip flag.
      Returns:
      the current tooltip flag
    • of

      static AttributeTooltipContext of(@Nullable @Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.item.Item.TooltipContext itemCtx, net.minecraft.world.item.component.TooltipDisplay tooltipDisplay, net.minecraft.world.item.TooltipFlag flag)