Class RegisterGuiOverlaysEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RegisterGuiOverlaysEvent
All Implemented Interfaces:
net.neoforged.fml.event.IModBusEvent

public class RegisterGuiOverlaysEvent extends net.neoforged.bus.api.Event implements net.neoforged.fml.event.IModBusEvent
Allows users to register custom GUI overlays.

This event is not cancellable, and does not have a result.

This event is fired on the mod-specific event bus, only on the logical client.

  • Field Details

  • Constructor Details

  • Method Details

    • registerBelowAll

      @Deprecated(forRemoval=true, since="1.20.2") public void registerBelowAll(String id, IGuiOverlay overlay)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use the RL-explicit variant instead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main bus
      Registers an overlay that renders below all others.
      Parameters:
      id - A unique resource id for this overlay
      overlay - The overlay
    • registerBelowAll

      public void registerBelowAll(ResourceLocation id, IGuiOverlay overlay)
      Registers an overlay that renders below all others.
      Parameters:
      id - A unique resource id for this overlay
      overlay - The overlay
    • registerBelow

      @Deprecated(forRemoval=true, since="1.20.2") public void registerBelow(ResourceLocation other, String id, IGuiOverlay overlay)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use the RL-explicit variant instead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main bus
      Registers an overlay that renders below another.
      Parameters:
      other - The id of the overlay to render below. This must be an overlay you have already registered or a vanilla overlay. Do not use other mods' overlays.
      id - A unique resource id for this overlay
      overlay - The overlay
    • registerBelow

      public void registerBelow(ResourceLocation other, ResourceLocation id, IGuiOverlay overlay)
      Registers an overlay that renders below another.
      Parameters:
      other - The id of the overlay to render below. This must be an overlay you have already registered or a vanilla overlay. Do not use other mods' overlays.
      id - A unique resource id for this overlay
      overlay - The overlay
    • registerAbove

      @Deprecated(forRemoval=true, since="1.20.2") public void registerAbove(ResourceLocation other, String id, IGuiOverlay overlay)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use the RL-explicit variant instead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main bus
      Registers an overlay that renders above another.
      Parameters:
      other - The id of the overlay to render above. This must be an overlay you have already registered or a vanilla overlay. Do not use other mods' overlays.
      id - A unique resource id for this overlay
      overlay - The overlay
    • registerAbove

      public void registerAbove(ResourceLocation other, ResourceLocation id, IGuiOverlay overlay)
      Registers an overlay that renders above another.
      Parameters:
      other - The id of the overlay to render above. This must be an overlay you have already registered or a vanilla overlay. Do not use other mods' overlays.
      id - A unique resource id for this overlay
      overlay - The overlay
    • registerAboveAll

      @Deprecated(forRemoval=true, since="1.20.2") public void registerAboveAll(String id, IGuiOverlay overlay)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use the RL-explicit variant instead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main bus
      Registers an overlay that renders above all others.
      Parameters:
      id - A unique resource id for this overlay
      overlay - The overlay
    • registerAboveAll

      public void registerAboveAll(ResourceLocation id, IGuiOverlay overlay)
      Registers an overlay that renders above all others.
      Parameters:
      id - A unique resource id for this overlay
      overlay - The overlay
    • register

      private void register(RegisterGuiOverlaysEvent.Ordering ordering, @Nullable @Nullable ResourceLocation other, ResourceLocation key, IGuiOverlay overlay)