public class ItemTooltipEvent extends PlayerEvent
PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.Visibility
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing
Event.HasResult, Event.Result
Modifier and Type | Field and Description |
---|---|
private ITooltipFlag |
flags |
private ItemStack |
itemStack |
private java.util.List<java.lang.String> |
toolTip |
Constructor and Description |
---|
ItemTooltipEvent(ItemStack itemStack,
EntityPlayer entityPlayer,
java.util.List<java.lang.String> toolTip,
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 |
---|---|
EntityPlayer |
getEntityPlayer()
This event is fired with a null player during startup when populating search trees for tooltips.
|
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. |
java.util.List<java.lang.String> |
getToolTip()
The
ItemStack tooltip. |
getEntityLiving
getEntity
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
private final ITooltipFlag flags
@Nonnull private final ItemStack itemStack
private final java.util.List<java.lang.String> toolTip
public ItemTooltipEvent(@Nonnull ItemStack itemStack, @Nullable EntityPlayer entityPlayer, java.util.List<java.lang.String> toolTip, 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<java.lang.String> getToolTip()
ItemStack
tooltip.@Nullable public EntityPlayer getEntityPlayer()
getEntityPlayer
in class PlayerEvent