Class ItemTooltipEvent


public class ItemTooltipEvent extends PlayerEvent
  • Field Details

  • Constructor Details

    • ItemTooltipEvent

      public ItemTooltipEvent(@Nonnull ItemStack itemStack, @Nullable PlayerEntity entityPlayer, List<ITextComponent> list, ITooltipFlag flags)
      This event is fired in ItemStack#getTooltip(EntityPlayer, ITooltipFlag), which in turn is called from it's respective GUIContainer. Tooltips are also gathered with a null entityPlayer during startup by Minecraft#populateSearchTreeManager().
  • Method Details

    • getFlags

      public ITooltipFlag getFlags()
      Use to determine if the advanced information on item tooltips is being shown, toggled by F3+H.
    • getItemStack

      @Nonnull public ItemStack getItemStack()
      The ItemStack with the tooltip.
    • getToolTip

      public List<ITextComponent> getToolTip()
      The ItemStack tooltip.
    • getPlayer

      @Nullable public PlayerEntity getPlayer()
      This event is fired with a null player during startup when populating search trees for tooltips.
      Overrides:
      getPlayer in class PlayerEvent
      Returns:
      Player