Class ItemTooltipEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.entity.EntityEvent
-
- net.minecraftforge.event.entity.living.LivingEvent
-
- net.minecraftforge.event.entity.player.PlayerEvent
-
- net.minecraftforge.event.entity.player.ItemTooltipEvent
-
public class ItemTooltipEvent extends PlayerEvent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.player.PlayerEvent
PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemPickupEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerChangeGameModeEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.TabListNameFormat, PlayerEvent.Visibility
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent, LivingEvent.LivingVisibilityEvent
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
-
-
Field Summary
Fields Modifier and Type Field Description private ITooltipFlag
flags
private ItemStack
itemStack
private java.util.List<ITextComponent>
toolTip
-
Constructor Summary
Constructors Constructor Description ItemTooltipEvent(ItemStack itemStack, PlayerEntity entityPlayer, java.util.List<ITextComponent> list, ITooltipFlag flags)
This event is fired inItemStack#getTooltip(EntityPlayer, ITooltipFlag)
, which in turn is called from it's respective GUIContainer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ITooltipFlag
getFlags()
Use to determine if the advanced information on item tooltips is being shown, toggled by F3+H.ItemStack
getItemStack()
TheItemStack
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()
TheItemStack
tooltip.-
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Field Detail
-
flags
private final ITooltipFlag flags
-
itemStack
@Nonnull private final ItemStack itemStack
-
toolTip
private final java.util.List<ITextComponent> toolTip
-
-
Constructor Detail
-
ItemTooltipEvent
public ItemTooltipEvent(@Nonnull ItemStack itemStack, @Nullable PlayerEntity entityPlayer, java.util.List<ITextComponent> list, ITooltipFlag flags)
This event is fired inItemStack#getTooltip(EntityPlayer, ITooltipFlag)
, which in turn is called from it's respective GUIContainer. Tooltips are also gathered with a null entityPlayer during startup byMinecraft#populateSearchTreeManager()
.
-
-
Method Detail
-
getFlags
public ITooltipFlag getFlags()
Use to determine if the advanced information on item tooltips is being shown, toggled by F3+H.
-
getToolTip
public java.util.List<ITextComponent> getToolTip()
TheItemStack
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 classPlayerEvent
- Returns:
- Player
-
-