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

public static class EntityRenderersEvent.RegisterRenderers extends 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.

  • 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 for
      entityRendererProvider - 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 for
      blockEntityRendererProvider - the renderer provider