Package net.minecraftforge.client.event
Class EntityRenderersEvent.RegisterRenderers
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.EntityRenderersEvent
net.minecraftforge.client.event.EntityRenderersEvent.RegisterRenderers
- All Implemented Interfaces:
IModBusEvent
- Enclosing class:
- EntityRenderersEvent
Provides a safe place to register entity renderers and layer renderers.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.client.event.EntityRenderersEvent
EntityRenderersEvent.AddLayers, EntityRenderersEvent.RegisterLayerDefinitions, EntityRenderersEvent.RegisterRenderers
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends BlockEntity>
voidregisterBlockEntityRenderer(BlockEntityType<? extends T> blockEntityType, BlockEntityRendererProvider<T> blockEntityRendererProvider)
Registers a block entity renderer.<T extends Entity>
voidregisterEntityRenderer(EntityType<? extends T> entityType, EntityRendererProvider<T> entityRendererProvider)
Registers an entity renderer.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Constructor Details
-
RegisterRenderers
public RegisterRenderers()
-
-
Method Details
-
registerEntityRenderer
public <T extends Entity> void registerEntityRenderer(EntityType<? extends T> entityType, EntityRendererProvider<T> entityRendererProvider)Registers an entity renderer.- Parameters:
entityType
- The EntityType to register a renderer forentityRendererProvider
- The renderer provider, can be a lambda like MyRenderer::new
-
registerBlockEntityRenderer
public <T extends BlockEntity> void registerBlockEntityRenderer(BlockEntityType<? extends T> blockEntityType, BlockEntityRendererProvider<T> blockEntityRendererProvider)Registers a block entity renderer.- Parameters:
blockEntityType
- The BlockEntityType to register a renderer forblockEntityRendererProvider
- The renderer provider, can be a lambda like MyRenderer::new
-