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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BakedModelRenderable
of
(BakedModel model) Constructs aBakedModelRenderable
from the given baked model.static BakedModelRenderable
of
(ModelResourceLocation model) Constructs aBakedModelRenderable
from the given model location.void
render
(PoseStack poseStack, MultiBufferSource bufferSource, ITextureRenderTypeLookup textureRenderTypeLookup, int lightmap, int overlay, float partialTick, BakedModelRenderable.Context context) Draws the renderable by adding the geometry to the providedMultiBufferSource
withContext
(ModelData modelData) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.client.model.renderable.IRenderable
withContext
-
Field Details
-
model
-
-
Constructor Details
-
BakedModelRenderable
-
-
Method Details
-
of
Constructs aBakedModelRenderable
from the given model location. The model is expected to have been baked ahead of time.- See Also:
-
of
Constructs aBakedModelRenderable
from 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:IRenderable
Draws the renderable by adding the geometry to the providedMultiBufferSource
- Specified by:
render
in 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. SeeLightTexture
overlay
- The overlay coordinates representing the current overlay status. SeeOverlayTexture
partialTick
- The current time expressed in the fraction of a tick elapsed since the last client tickcontext
- The context used for rendering
-
withContext
-
withModelDataContext
-