Class RegisterNamedRenderTypesEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RegisterNamedRenderTypesEvent
- All Implemented Interfaces:
net.neoforged.fml.event.IModBusEvent
public class RegisterNamedRenderTypesEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.fml.event.IModBusEvent
Allows users to register custom named
render types
.
This event is not
, and does not have a result.
invalid @linkplain
cancellable
This event is fired on the mod-specific event bus, only on the logical client.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.bus.api.Event
net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRegisterNamedRenderTypesEvent
(Map<ResourceLocation, RenderTypeGroup> renderTypes) -
Method Summary
Modifier and TypeMethodDescriptionvoid
register
(String name, RenderType blockRenderType, RenderType entityRenderType) Deprecated, for removal: This API element is subject to removal in a future version.void
register
(String name, RenderType blockRenderType, RenderType entityRenderType, RenderType fabulousEntityRenderType) Deprecated, for removal: This API element is subject to removal in a future version.Usethe RL-explicit variant
instead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main busvoid
register
(ResourceLocation key, RenderType blockRenderType, RenderType entityRenderType) Registers a namedRenderTypeGroup
.void
register
(ResourceLocation key, RenderType blockRenderType, RenderType entityRenderType, RenderType fabulousEntityRenderType) Registers a namedRenderTypeGroup
.Methods inherited from class net.neoforged.bus.api.Event
getResult, hasResult, setResult
-
Field Details
-
renderTypes
-
-
Constructor Details
-
RegisterNamedRenderTypesEvent
-
-
Method Details
-
register
@Deprecated(forRemoval=true, since="1.20.2") public void register(String name, RenderType blockRenderType, RenderType entityRenderType) Deprecated, for removal: This API element is subject to removal in a future version.Usethe RL-explicit variant
instead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main busRegisters a namedRenderTypeGroup
.- Parameters:
name
- The nameblockRenderType
- One of the values returned byRenderType.chunkBufferLayers()
entityRenderType
- ARenderType
usingDefaultVertexFormat.NEW_ENTITY
-
register
Registers a namedRenderTypeGroup
.- Parameters:
key
- The ID of the groupblockRenderType
- One of the values returned byRenderType.chunkBufferLayers()
entityRenderType
- ARenderType
usingDefaultVertexFormat.NEW_ENTITY
-
register
@Deprecated(forRemoval=true, since="1.20.2") public void register(String name, RenderType blockRenderType, RenderType entityRenderType, RenderType fabulousEntityRenderType) Deprecated, for removal: This API element is subject to removal in a future version.Usethe RL-explicit variant
instead; mod ID inference will be removed in a later update, alongside the move of registration events to the NeoForge main busRegisters a namedRenderTypeGroup
.- Parameters:
name
- The nameblockRenderType
- One of the values returned byRenderType.chunkBufferLayers()
entityRenderType
- ARenderType
usingDefaultVertexFormat.NEW_ENTITY
fabulousEntityRenderType
- ARenderType
usingDefaultVertexFormat.NEW_ENTITY
for use when "fabulous" rendering is enabled
-
register
public void register(ResourceLocation key, RenderType blockRenderType, RenderType entityRenderType, RenderType fabulousEntityRenderType) Registers a namedRenderTypeGroup
.- Parameters:
key
- The ID of the groupblockRenderType
- One of the values returned byRenderType.chunkBufferLayers()
entityRenderType
- ARenderType
usingDefaultVertexFormat.NEW_ENTITY
fabulousEntityRenderType
- ARenderType
usingDefaultVertexFormat.NEW_ENTITY
for use when "fabulous" rendering is enabled
-
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