Class BlockEntityRendererRegistry
java.lang.Object
net.fabricmc.fabric.api.client.rendering.v1.BlockEntityRendererRegistry
Helper class for registering BlockEntityRenderers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends net.minecraft.block.entity.BlockEntity>
voidregister
(net.minecraft.block.entity.BlockEntityType<E> blockEntityType, net.minecraft.client.render.block.entity.BlockEntityRendererFactory<? super E> blockEntityRendererFactory) Register a BlockEntityRenderer for a BlockEntityType.
-
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
- theBlockEntity
- Parameters:
blockEntityType
- theBlockEntityType
to register a renderer forblockEntityRendererFactory
- aBlockEntityRendererFactory
that creates aBlockEntityRenderer
, called whenBlockEntityRenderDispatcher
is initialized or immediately if the dispatcher class is already loaded
-