Class RenderGuiLayerEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RenderGuiLayerEvent
Direct Known Subclasses:
RenderGuiLayerEvent.Post, RenderGuiLayerEvent.Pre

public abstract class RenderGuiLayerEvent extends net.neoforged.bus.api.Event
Fired when a GUI layer is rendered to the screen. See the two subclasses for listening to the two possible phases.

A layer that is not normally active (for example because the player pressed F1) cannot be forced to render. In such cases, this event will however still fire.

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Fired after a GUI layer is rendered to the screen, if the corresponding RenderGuiLayerEvent.Pre is not cancelled.
    static class 
    Fired before a GUI layer is rendered to the screen.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final net.minecraft.client.gui.GuiGraphics
     
    private final net.minecraft.client.gui.LayeredDraw.Layer
     
    private final net.minecraft.resources.ResourceLocation
     
    private final net.minecraft.client.DeltaTracker
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    RenderGuiLayerEvent(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.DeltaTracker partialTick, net.minecraft.resources.ResourceLocation name, net.minecraft.client.gui.LayeredDraw.Layer layer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.client.gui.GuiGraphics
     
    net.minecraft.client.gui.LayeredDraw.Layer
     
    net.minecraft.resources.ResourceLocation
     
    net.minecraft.client.DeltaTracker
     

    Methods inherited from class java.lang.Object

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

    • guiGraphics

      private final net.minecraft.client.gui.GuiGraphics guiGraphics
    • partialTick

      private final net.minecraft.client.DeltaTracker partialTick
    • name

      private final net.minecraft.resources.ResourceLocation name
    • layer

      private final net.minecraft.client.gui.LayeredDraw.Layer layer
  • Constructor Details

    • RenderGuiLayerEvent

      @Internal protected RenderGuiLayerEvent(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.DeltaTracker partialTick, net.minecraft.resources.ResourceLocation name, net.minecraft.client.gui.LayeredDraw.Layer layer)
  • Method Details

    • getGuiGraphics

      public net.minecraft.client.gui.GuiGraphics getGuiGraphics()
    • getPartialTick

      public net.minecraft.client.DeltaTracker getPartialTick()
    • getName

      public net.minecraft.resources.ResourceLocation getName()
    • getLayer

      public net.minecraft.client.gui.LayeredDraw.Layer getLayer()