Package net.minecraftforge.client.event
Class RenderTooltipEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.RenderTooltipEvent
- Direct Known Subclasses:
 RenderTooltipEvent.Color,RenderTooltipEvent.Pre
public abstract class RenderTooltipEvent
extends net.minecraftforge.eventbus.api.Event
Fired during tooltip rendering.
 See the various subclasses for listening to specific events.
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFired when the colours for the tooltip background are determined.static classFired when a tooltip gathers theTooltipComponents to be rendered, before any text wrapping or processing.static classFired before the tooltip is rendered.Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<ClientTooltipComponent>protected Fontprotected final GuiGraphicsprotected final @NotNull ItemStackprotected intprotected int - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRenderTooltipEvent(@NotNull ItemStack itemStack, GuiGraphics graphics, int x, int y, @NotNull Font font, @NotNull List<ClientTooltipComponent> components)  - 
Method Summary
Modifier and TypeMethodDescription@NotNull List<ClientTooltipComponent>Returns the unmodifiable list of tooltip components.@NotNull FontgetFont()Returns The font used to render the text.Returns the graphics helper for the gui.@NotNull ItemStackReturns the item stack which the tooltip is being rendered for, or an empty item stack if there is no associated item stack.intgetX()Returns the X position of the tooltip box.intgetY()Returns the Y position of the tooltip box.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult 
- 
Field Details
- 
itemStack
 - 
graphics
 - 
x
protected int x - 
y
protected int y - 
font
 - 
components
 
 - 
 - 
Constructor Details
- 
RenderTooltipEvent
@Internal protected RenderTooltipEvent(@NotNull @NotNull ItemStack itemStack, GuiGraphics graphics, int x, int y, @NotNull @NotNull Font font, @NotNull @NotNull List<ClientTooltipComponent> components)  
 - 
 - 
Method Details
- 
getItemStack
Returns the item stack which the tooltip is being rendered for, or an empty item stack if there is no associated item stack.- Returns:
 - the item stack which the tooltip is being rendered for, or an empty item stack if there is no associated item stack
 
 - 
getGraphics
Returns the graphics helper for the gui.- Returns:
 - the graphics helper for the gui
 
 - 
getComponents
Returns the unmodifiable list of tooltip components.Use
ItemTooltipEventorRenderTooltipEvent.GatherComponentsto modify tooltip contents or components.- Returns:
 - the unmodifiable list of tooltip components
 
 - 
getX
public int getX()Returns the X position of the tooltip box. By default, this is the mouse X position.- Returns:
 - the X position of the tooltip box
 
 - 
getY
public int getY()Returns the Y position of the tooltip box. By default, this is the mouse Y position.- Returns:
 - the Y position of the tooltip box
 
 - 
getFont
Returns The font used to render the text.- Returns:
 - The font used to render the text
 
 
 -