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
LoadedBlockEntityModels.render(net.minecraft.block.Block, net.minecraft.item.ModelTransformationMode, net.minecraft.client.util.math.MatrixStack, net.minecraft.client.render.VertexConsumerProvider, int, int)
is invoked. The most common use of this method is through
BlockRenderManager.renderBlockAsEntity(net.minecraft.block.BlockState, net.minecraft.client.util.math.MatrixStack, net.minecraft.client.render.VertexConsumerProvider, int, int)
, which is used for rendering blocks in minecarts, blocks held by
endermen, and other cases.-
Method Summary
Modifier and TypeMethodDescriptionstatic void
register
(Block block, SpecialModelRenderer.Unbaked unbakedRenderer) Assign the given unbaked renderer to the given block.
-
Method Details
-
register
Assign the given unbaked renderer to the given block.SpecialModelRenderer.Unbaked.getCodec()
will not be used and can returnnull
.
-