Clarify an aspect about the block renderer registry (#1035)

* Clarify an aspect about the block renderer registry.

* Update fabric-renderer-registries-v1/src/main/java/net/fabricmc/fabric/api/client/rendereregistry/v1/BlockEntityRendererRegistry.java

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

Co-authored-by: liach <7806504+liach@users.noreply.github.com>
This commit is contained in:
shartte 2020-09-27 13:09:20 +02:00 committed by GitHub
parent 616c01224d
commit bbdb433e98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,10 +32,12 @@ public interface BlockEntityRendererRegistry {
BlockEntityRendererRegistry INSTANCE = new BlockEntityRendererRegistryImpl(); BlockEntityRendererRegistry INSTANCE = new BlockEntityRendererRegistryImpl();
/** /**
* Register a BlockEntityRenderer for a BlockEntityType. Can be called clientside before the world is rendered * Register a BlockEntityRenderer for a BlockEntityType. Can be called clientside before the world is rendered.
* *
* @param blockEntityType the {@link BlockEntityType} to register a renderer for * @param blockEntityType the {@link BlockEntityType} to register a renderer for
* @param blockEntityRenderer a function that returns a {@link BlockEntityRenderer} * @param blockEntityRenderer a function that returns a {@link BlockEntityRenderer}, called
* when {@link BlockEntityRenderDispatcher} is initialized or immediately if the dispatcher
* class is already loaded
* @param <E> the {@link BlockEntity} * @param <E> the {@link BlockEntity}
*/ */
<E extends BlockEntity> void register(BlockEntityType<E> blockEntityType, Function<BlockEntityRenderDispatcher, BlockEntityRenderer<E>> blockEntityRenderer); <E extends BlockEntity> void register(BlockEntityType<E> blockEntityType, Function<BlockEntityRenderDispatcher, BlockEntityRenderer<E>> blockEntityRenderer);