Class SpecialBlockRendererRegistry
java.lang.Object
net.fabricmc.fabric.api.client.rendering.v1.SpecialBlockRendererRegistry
Allows registering special renderers for certain blocks, such that they are used when
SpecialBlockModelRenderer.renderByBlock(Block, ItemDisplayContext, PoseStack, SubmitNodeCollector, int, int, int) is invoked. The most common use of this method is through
BlockRenderDispatcher.renderSingleBlock(BlockState, PoseStack, MultiBufferSource, int, int), which is used for rendering blocks in minecarts, blocks held by
endermen, and other cases.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidregister(net.minecraft.world.level.block.Block block, net.minecraft.client.renderer.special.SpecialModelRenderer.Unbaked unbakedRenderer) Assign the given unbaked renderer to the given block.
-
Method Details
-
register
public static void register(net.minecraft.world.level.block.Block block, net.minecraft.client.renderer.special.SpecialModelRenderer.Unbaked unbakedRenderer) Assign the given unbaked renderer to the given block.SpecialModelRenderer.Unbaked.type()will not be used and can returnnull.
-