Class ScreenEvent.Render

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ScreenEvent
net.neoforged.neoforge.client.event.ScreenEvent.Render
Direct Known Subclasses:
ScreenEvent.Render.Post, ScreenEvent.Render.Pre
Enclosing class:
ScreenEvent

public abstract static class ScreenEvent.Render extends ScreenEvent
Fired when a screen is being drawn. See the two subclasses for listening before and after drawing.
See Also:
  • Field Details

    • guiGraphics

      private final GuiGraphics guiGraphics
    • mouseX

      private final int mouseX
    • mouseY

      private final int mouseY
    • partialTick

      private final float partialTick
  • Constructor Details

    • Render

      @Internal protected Render(Screen screen, GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick)
  • Method Details

    • getGuiGraphics

      public GuiGraphics getGuiGraphics()
      Returns the gui graphics used for rendering.
      Returns:
      the gui graphics used for rendering
    • getMouseX

      public int getMouseX()
      Returns the X coordinate of the mouse pointer.
      Returns:
      the X coordinate of the mouse pointer
    • getMouseY

      public int getMouseY()
      Returns the Y coordinate of the mouse pointer.
      Returns:
      the Y coordinate of the mouse pointer
    • getPartialTick

      public float getPartialTick()
      Returns the partial tick.
      Returns:
      the partial tick