Interface FabricBlockRenderManager


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

    • renderBlockAsEntity

      default void renderBlockAsEntity(BlockState state, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BlockRenderView blockView, BlockPos pos)
      Alternative for BlockRenderManager.renderBlockAsEntity(BlockState, MatrixStack, VertexConsumerProvider, int, int) that additionally accepts the BlockRenderView and BlockPos to pass to
      invalid reference
      BlockStateModel#emitQuads(QuadEmitter, BlockRenderView, BlockPos, BlockState, Random, 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. Also invokes the SpecialModelRenderer. 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. EmptyBlockRenderView).
      pos - The position of the block in the world. Should be BlockPos.ORIGIN if the world is empty.