Interface FabricRenderCommandQueue
public interface FabricRenderCommandQueue
Note: This interface is automatically implemented on
RenderCommandQueue via Mixin and interface injection.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidsubmitBlock(MatrixStack matrices, BlockState state, int light, int overlay, int outlineColor, BlockRenderView blockView, BlockPos pos) Alternative forRenderCommandQueue.submitBlock(MatrixStack, BlockState, int, int, int)that additionally accepts theBlockRenderViewandBlockPosto pass towhen necessary.invalid reference
BlockStateModel#emitQuads(QuadEmitter, BlockRenderView, BlockPos, BlockState, Random, Predicate)default voidsubmitBlockStateModel(MatrixStack matrices, Function<BlockRenderLayer, RenderLayer> renderLayerFunction, BlockStateModel model, float r, float g, float b, int light, int overlay, int outlineColor, BlockRenderView blockView, BlockPos pos, BlockState state) Alternative forRenderCommandQueue.submitBlockStateModel(MatrixStack, RenderLayer, BlockStateModel, float, float, float, int, int, int)that accepts aFunction<BlockRenderLayer, RenderLayer>instead of aRenderLayer.
-
Method Details
-
submitBlock
default void submitBlock(MatrixStack matrices, BlockState state, int light, int overlay, int outlineColor, BlockRenderView blockView, BlockPos pos) Alternative forRenderCommandQueue.submitBlock(MatrixStack, BlockState, int, int, int)that additionally accepts theBlockRenderViewandBlockPosto pass towhen necessary. Prefer using this method over the vanilla alternative to correctly render 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 rendering a block model with minimal transformations to the model geometry. Also invokes the
SpecialModelRenderer. Usually used by entity renderers.- Parameters:
matrices- The matrices.state- The block state.light- The minimum light value.overlay- The overlay value.outlineColor- The outline color.blockView- The world in which to render the model. Can be empty (i.e.EmptyBlockRenderView). Must not be mutated after calling this method.pos- The position of the block in the world. Should beBlockPos.ORIGINif the world is empty. Must not be mutated after calling this method.- See Also:
-
submitBlockStateModel
default void submitBlockStateModel(MatrixStack matrices, Function<BlockRenderLayer, RenderLayer> renderLayerFunction, BlockStateModel model, float r, float g, float b, int light, int overlay, int outlineColor, BlockRenderView blockView, BlockPos pos, BlockState state) Alternative forRenderCommandQueue.submitBlockStateModel(MatrixStack, RenderLayer, BlockStateModel, float, float, float, int, int, int)that accepts aFunction<BlockRenderLayer, RenderLayer>instead of aRenderLayer. Also accepts theBlockRenderView,BlockPos, andBlockStateto pass towhen necessary. Prefer using this method over the vanilla alternative to correctly render 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 rendering a block model with minimal transformations to the model geometry. Usually used by entity renderers.
- Parameters:
matrices- The matrices.renderLayerFunction- The function to use to convertBlockRenderLayers toRenderLayers. Must not be mutated after calling this method.model- The model to render.r- The red component of the tint color.g- The green component of the tint color.b- The blue component of the tint color.light- The minimum light value.overlay- The overlay value.outlineColor- The outline color.blockView- The world in which to render the model. Can be empty (i.e.EmptyBlockRenderView). Must not be mutated after calling this method.pos- The position of the block in the world. Should beBlockPos.ORIGINif the world is empty. Must not be mutated after calling this method.state- The block state. Should beBlocks.AIR.getDefaultState()if not applicable.- See Also:
-