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
Fired for registering entity and block entity renderers at the appropriate time.
For registering entity renderer layers to existing entity renderers (whether vanilla or registered through this
event), listen for the
EntityRenderersEvent.AddLayers
event instead.
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 classes/interfaces inherited from class net.minecraftforge.client.event.EntityRenderersEvent
EntityRenderersEvent.AddLayers, EntityRenderersEvent.CreateSkullModels, 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 for the given block entity type.<T extends Entity>
voidregisterEntityRenderer
(EntityType<? extends T> entityType, EntityRendererProvider<T> entityRendererProvider) Registers an entity renderer for the given entity type.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
RegisterRenderers
@Internal public RegisterRenderers()
-
-
Method Details
-
registerEntityRenderer
public <T extends Entity> void registerEntityRenderer(EntityType<? extends T> entityType, EntityRendererProvider<T> entityRendererProvider) Registers an entity renderer for the given entity type.- Parameters:
entityType
- the entity type to register a renderer forentityRendererProvider
- the renderer provider
-
registerBlockEntityRenderer
public <T extends BlockEntity> void registerBlockEntityRenderer(BlockEntityType<? extends T> blockEntityType, BlockEntityRendererProvider<T> blockEntityRendererProvider) Registers a block entity renderer for the given block entity type.- Parameters:
blockEntityType
- the block entity type to register a renderer forblockEntityRendererProvider
- the renderer provider
-