Interface RenderContext.BakedModelConsumer
- All Superinterfaces:
Consumer<net.minecraft.client.render.model.BakedModel>
- Enclosing interface:
- RenderContext
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(net.minecraft.client.render.model.BakedModel model) Render a baked model by processing its BakedModel.getQuads(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, java.util.Random) using the rendered block state.voidaccept(net.minecraft.client.render.model.BakedModel model, @Nullable net.minecraft.block.BlockState state) Render a baked model by processing its BakedModel.getQuads(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, java.util.Random) with an explicit block state.
-
Method Details
-
accept
void accept(net.minecraft.client.render.model.BakedModel model) Render a baked model by processing its BakedModel.getQuads(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, java.util.Random) using the rendered block state.For block contexts, this will pass the block state being rendered to
BakedModel.getQuads(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, java.util.Random). For item contexts, this will pass anullblock state toBakedModel.getQuads(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, java.util.Random).accept(BakedModel, BlockState)can be used instead to pass the block state explicitly. -
accept
void accept(net.minecraft.client.render.model.BakedModel model, @Nullable @Nullable net.minecraft.block.BlockState state) Render a baked model by processing its BakedModel.getQuads(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, java.util.Random) with an explicit block state.This overload allows passing the block state (or
nullto query the item quads). This is useful when a model is being wrapped, and expects a different block state than the one of the block being rendered.For item render contexts, you can use this function if you want to render the model with a specific block state. Otherwise, use accept(BakedModel) the other overload} to render the usual item quads.
-