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

public static class RenderTooltipEvent.Pre extends 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.

  • Field Details

    • screenWidth

      private int screenWidth
    • screenHeight

      private int screenHeight
  • Constructor Details

  • Method Details

    • getScreenWidth

      public int getScreenWidth()
    • getScreenHeight

      public int getScreenHeight()
    • setFont

      public void setFont(@Nonnull Font fr)
      Sets the Font 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.