Package net.minecraftforge.client.event
Class RenderTooltipEvent.Pre
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.RenderTooltipEvent
net.minecraftforge.client.event.RenderTooltipEvent.Pre
- Enclosing class:
- RenderTooltipEvent
This event is fired before any tooltip calculations are done. It provides setters for all aspects of the tooltip, so the final render can be modified.
This event is Cancelable
.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.client.event.RenderTooltipEvent
RenderTooltipEvent.Color, RenderTooltipEvent.GatherComponents, RenderTooltipEvent.Pre
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
Fields inherited from class net.minecraftforge.client.event.RenderTooltipEvent
components, font, itemStack, poseStack, x, y
-
Constructor Summary
-
Method Summary
Methods inherited from class net.minecraftforge.client.event.RenderTooltipEvent
getComponents, getFont, getItemStack, getPoseStack, getX, getY
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
screenWidth
private int screenWidth -
screenHeight
private int screenHeight
-
-
Constructor Details
-
Pre
public Pre(@Nonnull ItemStack stack, PoseStack poseStack, int x, int y, int screenWidth, int screenHeight, @Nonnull Font font, @Nonnull List<ClientTooltipComponent> components)
-
-
Method Details
-
getScreenWidth
public int getScreenWidth() -
getScreenHeight
public int getScreenHeight() -
setFont
Sets theFont
to be used to render text. -
setX
public void setX(int x) Set the X origin of the tooltip. -
setY
public void setY(int y) Set the Y origin of the tooltip.
-