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
    • maxWidth

      private int maxWidth
  • Constructor Details

  • Method Details

    • getScreenWidth

      public int getScreenWidth()
    • setScreenWidth

      @Deprecated(since="1.18", forRemoval=true) public void setScreenWidth(int screenWidth)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getScreenHeight

      public int getScreenHeight()
    • setScreenHeight

      @Deprecated(since="1.18", forRemoval=true) public void setScreenHeight(int screenHeight)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getMaxWidth

      @Deprecated(since="1.18", forRemoval=true) public int getMaxWidth()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The max width the tooltip can be. Defaults to -1 (unlimited).
    • setMaxWidth

      @Deprecated(since="1.18", forRemoval=true) public void setMaxWidth(int maxWidth)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the max width of the tooltip. Use -1 for unlimited.
    • setFontRenderer

      public void setFontRenderer(@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.