Class RegisterGuiOverlaysEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.RegisterGuiOverlaysEvent
All Implemented Interfaces:
IModBusEvent

public class RegisterGuiOverlaysEvent extends net.minecraftforge.eventbus.api.Event implements 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

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

      public void registerBelow(@NotNull @NotNull ResourceLocation other, @NotNull @NotNull String id, @NotNull @NotNull 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

      public void registerAbove(@NotNull @NotNull ResourceLocation other, @NotNull @NotNull String id, @NotNull @NotNull 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

      public void registerAboveAll(@NotNull @NotNull String id, @NotNull @NotNull 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(@NotNull @NotNull RegisterGuiOverlaysEvent.Ordering ordering, @Nullable @Nullable ResourceLocation other, @NotNull @NotNull String id, @NotNull @NotNull IGuiOverlay overlay)