Class ExpandItemTooltipEvent
java.lang.Object
com.blamejared.crafttweaker.natives.event.item.ExpandItemTooltipEvent
This event is fired whenever a tooltip is calculated.
Note: the player may not always be present, make sure you check if it is null before trying to use it
- DocParam:
- this event
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.item.TooltipFlaggetFlags(net.minecraftforge.event.entity.player.ItemTooltipEvent internal) Gets the extra tooltip flags, such as if advanced tooltips should be displayed.static IItemStackgetItemStack(net.minecraftforge.event.entity.player.ItemTooltipEvent internal) Gets the ItemStack that the tooltip is for.static net.minecraft.world.entity.player.PlayergetPlayer(net.minecraftforge.event.entity.player.ItemTooltipEvent internal) Gets the player that is viewing the tooltip.static List<net.minecraft.network.chat.Component>getToolTip(net.minecraftforge.event.entity.player.ItemTooltipEvent internal) Gets the list ofComponents that make up the tooltip.
-
Field Details
-
BUS
-
-
Constructor Details
-
ExpandItemTooltipEvent
public ExpandItemTooltipEvent()
-
-
Method Details
-
getFlags
public static net.minecraft.world.item.TooltipFlag getFlags(net.minecraftforge.event.entity.player.ItemTooltipEvent internal) Gets the extra tooltip flags, such as if advanced tooltips should be displayed.- Returns:
- The tooltip flags
-
getItemStack
public static IItemStack getItemStack(net.minecraftforge.event.entity.player.ItemTooltipEvent internal) Gets the ItemStack that the tooltip is for.- Returns:
- The ItemStack that the tooltip is for.
-
getToolTip
public static List<net.minecraft.network.chat.Component> getToolTip(net.minecraftforge.event.entity.player.ItemTooltipEvent internal) Gets the list ofComponents that make up the tooltip.- Returns:
- The list of
Componentthat make up the tooltip.
-
getPlayer
public static net.minecraft.world.entity.player.Player getPlayer(net.minecraftforge.event.entity.player.ItemTooltipEvent internal) Gets the player that is viewing the tooltip.Note: The player can be null
- Returns:
- The player that is viewing the tooltip.
-