Class ContainerScreenEvent.Render

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ContainerScreenEvent
net.neoforged.neoforge.client.event.ContainerScreenEvent.Render
Direct Known Subclasses:
ContainerScreenEvent.Render.Background, ContainerScreenEvent.Render.Foreground
Enclosing class:
ContainerScreenEvent

public abstract static class ContainerScreenEvent.Render extends ContainerScreenEvent
Fired every time an AbstractContainerScreen renders. See the two subclasses to listen for foreground or background rendering.

These events are fired on the main Forge event bus, only on the logical client.

See Also:
  • Field Details

    • guiGraphics

      private final GuiGraphics guiGraphics
    • mouseX

      private final int mouseX
    • mouseY

      private final int mouseY
  • Constructor Details

  • 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