Class SpecialBlockRendererRegistry

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

public final class SpecialBlockRendererRegistry extends Object
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 Type
    Method
    Description
    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.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 return null.