Class BlockEntityRendererRegistry

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

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

    Modifier and Type
    Method
    Description
    static <E extends net.minecraft.block.entity.BlockEntity>
    void
    register(net.minecraft.block.entity.BlockEntityType<E> blockEntityType, net.minecraft.client.render.block.entity.BlockEntityRendererFactory<? super E> blockEntityRendererFactory)
    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.block.entity.BlockEntity> void register(net.minecraft.block.entity.BlockEntityType<E> blockEntityType, net.minecraft.client.render.block.entity.BlockEntityRendererFactory<? super E> blockEntityRendererFactory)
      Register a BlockEntityRenderer for a BlockEntityType. Can be called clientside before the world is rendered.
      Type Parameters:
      E - the BlockEntity
      Parameters:
      blockEntityType - the BlockEntityType to register a renderer for
      blockEntityRendererFactory - a BlockEntityRendererFactory that creates a BlockEntityRenderer, called when BlockEntityRenderDispatcher is initialized or immediately if the dispatcher class is already loaded