Class ItemTooltipEvent

    • Constructor Detail

      • ItemTooltipEvent

        public ItemTooltipEvent​(@Nonnull
                                ItemStack itemStack,
                                @Nullable
                                PlayerEntity entityPlayer,
                                java.util.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 Detail

      • getFlags

        public ITooltipFlag getFlags()
        Use to determine if the advanced information on item tooltips is being shown, toggled by F3+H.
      • 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