Interface FabricBlockRenderManager
public interface FabricBlockRenderManager
Note: This interface is automatically implemented on
BlockRenderManager via Mixin and interface injection.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidrenderBlockAsEntity(BlockState state, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BlockRenderView blockView, BlockPos pos) Alternative forBlockRenderManager.renderBlockAsEntity(BlockState, MatrixStack, VertexConsumerProvider, int, int)that additionally accepts theBlockRenderViewandBlockPosto pass towhen necessary.invalid reference
BlockStateModel#emitQuads(QuadEmitter, BlockRenderView, BlockPos, BlockState, Random, Predicate)
-
Method Details
-
renderBlockAsEntity
default void renderBlockAsEntity(BlockState state, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BlockRenderView blockView, BlockPos pos) Alternative forBlockRenderManager.renderBlockAsEntity(BlockState, MatrixStack, VertexConsumerProvider, int, int)that additionally accepts theBlockRenderViewandBlockPosto pass towhen 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.invalid reference
BlockStateModel#emitQuads(QuadEmitter, BlockRenderView, BlockPos, BlockState, Random, Predicate)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 beBlockPos.ORIGINif the world is empty.
-