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.
- 
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.neoforged.bus.api.Event
net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result - 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<ResourceLocation>private final Map<ResourceLocation,IGuiOverlay>  - 
Constructor Summary
ConstructorsConstructorDescriptionRegisterGuiOverlaysEvent(Map<ResourceLocation, IGuiOverlay> overlays, List<ResourceLocation> orderedOverlays)  - 
Method Summary
Modifier and TypeMethodDescriptionprivate voidregister(RegisterGuiOverlaysEvent.Ordering ordering, @Nullable ResourceLocation other, ResourceLocation key, IGuiOverlay overlay) voidregisterAbove(ResourceLocation other, String id, IGuiOverlay overlay) Deprecated, for removal: This API element is subject to removal in a future version.voidregisterAbove(ResourceLocation other, ResourceLocation id, IGuiOverlay overlay) Registers an overlay that renders above another.voidregisterAboveAll(String id, IGuiOverlay overlay) Deprecated, for removal: This API element is subject to removal in a future version.Usethe RL-explicit variantinstead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main busvoidregisterAboveAll(ResourceLocation id, IGuiOverlay overlay) Registers an overlay that renders above all others.voidregisterBelow(ResourceLocation other, String id, IGuiOverlay overlay) Deprecated, for removal: This API element is subject to removal in a future version.Usethe RL-explicit variantinstead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main busvoidregisterBelow(ResourceLocation other, ResourceLocation id, IGuiOverlay overlay) Registers an overlay that renders below another.voidregisterBelowAll(String id, IGuiOverlay overlay) Deprecated, for removal: This API element is subject to removal in a future version.Usethe RL-explicit variantinstead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main busvoidregisterBelowAll(ResourceLocation id, IGuiOverlay overlay) Registers an overlay that renders below all others.Methods inherited from class net.neoforged.bus.api.Event
getResult, hasResult, setResult 
- 
Field Details
- 
overlays
 - 
orderedOverlays
 
 - 
 - 
Constructor Details
- 
RegisterGuiOverlaysEvent
@Internal public RegisterGuiOverlaysEvent(Map<ResourceLocation, IGuiOverlay> overlays, List<ResourceLocation> orderedOverlays)  
 - 
 - 
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.Usethe RL-explicit variantinstead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main busRegisters an overlay that renders below all others.- Parameters:
 id- A unique resource id for this overlayoverlay- The overlay
 - 
registerBelowAll
Registers an overlay that renders below all others.- Parameters:
 id- A unique resource id for this overlayoverlay- 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.Usethe RL-explicit variantinstead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main busRegisters 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 avanilla overlay. Do not use other mods' overlays.id- A unique resource id for this overlayoverlay- The overlay
 - 
registerBelow
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 avanilla overlay. Do not use other mods' overlays.id- A unique resource id for this overlayoverlay- 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.Usethe RL-explicit variantinstead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main busRegisters 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 avanilla overlay. Do not use other mods' overlays.id- A unique resource id for this overlayoverlay- The overlay
 - 
registerAbove
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 avanilla overlay. Do not use other mods' overlays.id- A unique resource id for this overlayoverlay- 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.Usethe RL-explicit variantinstead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main busRegisters an overlay that renders above all others.- Parameters:
 id- A unique resource id for this overlayoverlay- The overlay
 - 
registerAboveAll
Registers an overlay that renders above all others.- Parameters:
 id- A unique resource id for this overlayoverlay- The overlay
 - 
register
private void register(RegisterGuiOverlaysEvent.Ordering ordering, @Nullable @Nullable ResourceLocation other, ResourceLocation key, IGuiOverlay overlay)  
 - 
 
the RL-explicit variantinstead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main bus