Class ContainerScreenEvent.DrawForeground

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ContainerScreenEvent
net.minecraftforge.client.event.ContainerScreenEvent.DrawForeground
Enclosing class:
ContainerScreenEvent

public static class ContainerScreenEvent.DrawForeground extends ContainerScreenEvent
This event is fired directly after the GuiContainer has draw any foreground elements, But before the "dragged" stack, and before any tooltips. This is useful for any slot / item specific overlays. Things that need to be on top of All GUI elements but bellow tooltips and dragged stacks.
  • Field Details

    • poseStack

      private final PoseStack poseStack
    • mouseX

      private final int mouseX
    • mouseY

      private final int mouseY
  • Constructor Details

    • DrawForeground

      public DrawForeground(AbstractContainerScreen<?> guiContainer, PoseStack poseStack, int mouseX, int mouseY)
      Called directly after the GuiContainer has drawn any foreground elements.
      Parameters:
      guiContainer - The container.
      poseStack - The pose stack.
      mouseX - The current X position of the players mouse.
      mouseY - The current Y position of the players mouse.
  • Method Details

    • getPoseStack

      public PoseStack getPoseStack()
    • getMouseX

      public int getMouseX()
    • getMouseY

      public int getMouseY()