Class EntityRendererRegistry

java.lang.Object
net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry

@Environment(CLIENT) public final class EntityRendererRegistry extends Object
Helper class for registering EntityRenderers.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <E extends net.minecraft.entity.Entity>
    void
    register(net.minecraft.entity.EntityType<? extends E> entityType, net.minecraft.client.render.entity.EntityRendererFactory<E> entityRendererFactory)
    Register a BlockEntityRenderer for a BlockEntityType.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • register

      public static <E extends net.minecraft.entity.Entity> void register(net.minecraft.entity.EntityType<? extends E> entityType, net.minecraft.client.render.entity.EntityRendererFactory<E> entityRendererFactory)
      Register a BlockEntityRenderer for a BlockEntityType. Can be called clientside before the world is rendered.
      Type Parameters:
      E - the Entity
      Parameters:
      entityType - the EntityType to register a renderer for
      entityRendererFactory - a EntityRendererFactory that creates a EntityRenderer, called when EntityRenderDispatcher is initialized or immediately if the dispatcher class is already loaded