Interface FabricBlockRenderDispatcher
public interface FabricBlockRenderDispatcher
Note: This interface is automatically implemented on
BlockRenderDispatcher via Mixin and interface injection.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidrenderBlockAsEntity(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource bufferSource, int light, int overlay, net.minecraft.world.level.BlockAndTintGetter level, net.minecraft.core.BlockPos pos) Alternative forBlockRenderDispatcher.renderSingleBlock(BlockState, PoseStack, MultiBufferSource, int, int)that additionally accepts theBlockAndTintGetterandBlockPosto pass toFabricBlockStateModel.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 poseStack, net.minecraft.client.renderer.MultiBufferSource bufferSource, int light, int overlay, net.minecraft.world.level.BlockAndTintGetter level, net.minecraft.core.BlockPos pos) Alternative forBlockRenderDispatcher.renderSingleBlock(BlockState, PoseStack, MultiBufferSource, int, int)that additionally accepts theBlockAndTintGetterandBlockPosto pass toFabricBlockStateModel.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 chunk 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.poseStack- The pose stack.bufferSource- The buffer source.light- The minimum light value.overlay- The overlay value.level- The level in which to render the model. Can be empty (i.e.EmptyBlockAndTintGetter).pos- The position of the block in the level. Should beBlockPos.ZEROif the level is empty.- See Also:
-