public class ItemTooltipEvent extends PlayerEvent
PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemPickupEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.Visibility
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.EyeHeight
Modifier and Type | Field and Description |
---|---|
private ITooltipFlag |
flags |
private ItemStack |
itemStack |
private java.util.List<ITextComponent> |
toolTip |
Constructor and Description |
---|
ItemTooltipEvent(ItemStack itemStack,
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. |
Modifier and Type | Method and Description |
---|---|
ITooltipFlag |
getFlags()
Use to determine if the advanced information on item tooltips is being shown, toggled by F3+H.
|
ItemStack |
getItemStack()
The
ItemStack with the tooltip. |
PlayerEntity |
getPlayer()
This event is fired with a null player during startup when populating search trees for tooltips.
|
java.util.List<ITextComponent> |
getToolTip()
The
ItemStack tooltip. |
getEntityLiving
getEntity
private final ITooltipFlag flags
@Nonnull private final ItemStack itemStack
private final java.util.List<ITextComponent> toolTip
public ItemTooltipEvent(@Nonnull ItemStack itemStack, @Nullable PlayerEntity entityPlayer, java.util.List<ITextComponent> list, ITooltipFlag flags)
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()
.public ITooltipFlag getFlags()
public java.util.List<ITextComponent> getToolTip()
ItemStack
tooltip.@Nullable public PlayerEntity getPlayer()
getPlayer
in class PlayerEvent