Class BakedModelRenderable
java.lang.Object
net.neoforged.neoforge.client.model.renderable.BakedModelRenderable
- All Implemented Interfaces:
IRenderable<BakedModelRenderable.Context>
public class BakedModelRenderable
extends Object
implements IRenderable<BakedModelRenderable.Context>
Renderable wrapper for baked models.
The context can provide the BlockState, faces to be rendered, a RandomSource and seed,
a ModelData instance, and a tint.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BakedModelRenderableof(BakedModel model) Constructs aBakedModelRenderablefrom the given baked model.static BakedModelRenderableof(ResourceLocation model) Constructs aBakedModelRenderablefrom the given model location.voidrender(PoseStack poseStack, MultiBufferSource bufferSource, ITextureRenderTypeLookup textureRenderTypeLookup, int lightmap, int overlay, float partialTick, BakedModelRenderable.Context context) Draws the renderable by adding the geometry to the providedMultiBufferSourcewithContext(ModelData modelData) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.client.model.renderable.IRenderable
withContext
-
Field Details
-
model
-
-
Constructor Details
-
BakedModelRenderable
-
-
Method Details
-
of
Constructs aBakedModelRenderablefrom the given model location. The model is expected to have been baked ahead of time.- See Also:
-
of
Constructs aBakedModelRenderablefrom the given baked model. -
render
public void render(PoseStack poseStack, MultiBufferSource bufferSource, ITextureRenderTypeLookup textureRenderTypeLookup, int lightmap, int overlay, float partialTick, BakedModelRenderable.Context context) Description copied from interface:IRenderableDraws the renderable by adding the geometry to the providedMultiBufferSource- Specified by:
renderin interfaceIRenderable<BakedModelRenderable.Context>- Parameters:
poseStack- The pose stackbufferSource- The buffer source where the vertex data should be outputtextureRenderTypeLookup- A function that provides a RenderType for the given texturelightmap- The lightmap coordinates representing the current lighting conditions. SeeLightTextureoverlay- The overlay coordinates representing the current overlay status. SeeOverlayTexturepartialTick- The current time expressed in the fraction of a tick elapsed since the last client tickcontext- The context used for rendering
-
withContext
-
withModelDataContext
-