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
Provides a safe place to register entity renderers and layer renderers.
  • 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 for
      entityRendererProvider - 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 for
      blockEntityRendererProvider - The renderer provider, can be a lambda like MyRenderer::new