Class ContainerScreenEvent.Render

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ContainerScreenEvent
net.minecraftforge.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:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Fired after the container screen's background layer and elements are drawn.
    static class 
    Fired after the container screen's foreground layer and elements are drawn, but before rendering the tooltips and the item stack being dragged by the player.

    Nested classes/interfaces inherited from class net.minecraftforge.client.event.ContainerScreenEvent

    ContainerScreenEvent.Render

    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
    Modifier and Type
    Field
    Description
    private final int
     
    private final int
     
    private final PoseStack
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Render(AbstractContainerScreen<?> guiContainer, PoseStack poseStack, int mouseX, int mouseY)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the X coordinate of the mouse pointer.
    int
    Returns the Y coordinate of the mouse pointer.
    Returns the pose stack used for rendering.

    Methods inherited from class net.minecraftforge.client.event.ContainerScreenEvent

    getContainerScreen

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • poseStack

      private final PoseStack poseStack
    • mouseX

      private final int mouseX
    • mouseY

      private final int mouseY
  • Constructor Details

  • Method Details

    • getPoseStack

      public PoseStack getPoseStack()
      Returns the pose stack used for rendering.
      Returns:
      the pose stack 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