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(net.minecraft.world.level.block.Block, net.minecraft.world.item.ItemDisplayContext, com.mojang.blaze3d.vertex.PoseStack, net.minecraft.client.renderer.SubmitNodeCollector, int, int, int) is invoked. The most common use of this method is through BlockRenderDispatcher.renderSingleBlock(net.minecraft.world.level.block.state.BlockState, com.mojang.blaze3d.vertex.PoseStack, net.minecraft.client.renderer.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 java.lang.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.