Interface FabricBlockRenderManager


public interface FabricBlockRenderManager
Note: This interface is automatically implemented on BlockRenderDispatcher via Mixin and interface injection.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    renderBlockAsEntity(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack matrices, net.minecraft.client.renderer.MultiBufferSource vertexConsumers, int light, int overlay, net.minecraft.world.level.BlockAndTintGetter blockView, net.minecraft.core.BlockPos pos)
    Alternative for BlockRenderDispatcher.renderSingleBlock(BlockState, PoseStack, MultiBufferSource, int, int) that additionally accepts the BlockAndTintGetter and BlockPos to pass to
    invalid reference
    BlockStateModel#emitQuads(QuadEmitter, BlockAndTintGetter, BlockPos, BlockState, RandomSource, Predicate)
    when necessary.
  • Method Details

    • renderBlockAsEntity

      default void renderBlockAsEntity(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack matrices, net.minecraft.client.renderer.MultiBufferSource vertexConsumers, int light, int overlay, net.minecraft.world.level.BlockAndTintGetter blockView, net.minecraft.core.BlockPos pos)
      Alternative for BlockRenderDispatcher.renderSingleBlock(BlockState, PoseStack, MultiBufferSource, int, int) that additionally accepts the BlockAndTintGetter and BlockPos to pass to
      invalid reference
      BlockStateModel#emitQuads(QuadEmitter, BlockAndTintGetter, BlockPos, BlockState, RandomSource, Predicate)
      when necessary. Prefer using this method over the vanilla alternative to correctly buffer models that have geometry on multiple render layers and to provide the model with additional context.

      This method allows buffering a block model with minimal transformations to the model geometry. Usually used by entity renderers.

      Parameters:
      state - The block state.
      matrices - The matrices.
      vertexConsumers - The vertex consumers.
      light - The minimum light value.
      overlay - The overlay value.
      blockView - The world in which to render the model. Can be empty (i.e. EmptyBlockAndTintGetter).
      pos - The position of the block in the world. Should be BlockPos.ZERO if the world is empty.
      See Also: