Class RegisterGuiLayersEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RegisterGuiLayersEvent
- All Implemented Interfaces:
net.neoforged.fml.event.IModBusEvent
public class RegisterGuiLayersEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.fml.event.IModBusEvent
Allows users to register custom
layers for GUI rendering.
See also RenderGuiLayerEvent to intercept rendering of registered layers.
This event is not cancellable, and does not
.
invalid reference
have a result
This event is fired on the mod-specific event bus, only on the logical client.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidregister(RegisterGuiLayersEvent.Ordering ordering, @Nullable ResourceLocation other, ResourceLocation key, LayeredDraw.Layer layer) voidregisterAbove(ResourceLocation other, ResourceLocation id, LayeredDraw.Layer layer) Registers an layer that renders above another.voidregisterAboveAll(ResourceLocation id, LayeredDraw.Layer layer) Registers a layer that renders above all others.voidregisterBelow(ResourceLocation other, ResourceLocation id, LayeredDraw.Layer layer) Registers a layer that renders below another.voidregisterBelowAll(ResourceLocation id, LayeredDraw.Layer layer) Registers a layer that renders below all others.
-
Field Details
-
layers
-
-
Constructor Details
-
RegisterGuiLayersEvent
-
-
Method Details
-
registerBelowAll
Registers a layer that renders below all others.- Parameters:
id- A unique resource id for this layerlayer- The layer
-
registerBelow
Registers a layer that renders below another.- Parameters:
other- The id of the layer to render below. This must be a layer you have already registered or one of thevanilla layers. Do not use other mods' layers.id- A unique resource id for this layerlayer- The layer
-
registerAbove
Registers an layer that renders above another.- Parameters:
other- The id of the layer to render above. This must be a layer you have already registered or one of thevanilla layers. Do not use other mods' layers.id- A unique resource id for this layerlayer- The layer
-
registerAboveAll
Registers a layer that renders above all others.- Parameters:
id- A unique resource id for this layerlayer- The layer
-
register
private void register(RegisterGuiLayersEvent.Ordering ordering, @Nullable @Nullable ResourceLocation other, ResourceLocation key, LayeredDraw.Layer layer)
-