Interface IRenderable<T>
- Type Parameters:
- T- The type of context object used by the rendering logic
- All Known Implementing Classes:
- BakedModelRenderable,- CompositeRenderable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A standard interface for things that can be rendered to a 
MultiBufferSource.- 
Method SummaryModifier and TypeMethodDescriptionvoidrender(PoseStack poseStack, MultiBufferSource bufferSource, ITextureRenderTypeLookup textureRenderTypeLookup, int lightmap, int overlay, float partialTick, T context) Draws the renderable by adding the geometry to the providedMultiBufferSourcedefault IRenderable<Unit>withContext(T context) Wraps the current renderable along with a context.
- 
Method Details- 
rendervoid render(PoseStack poseStack, MultiBufferSource bufferSource, ITextureRenderTypeLookup textureRenderTypeLookup, int lightmap, int overlay, float partialTick, T context) Draws the renderable by adding the geometry to the providedMultiBufferSource- Parameters:
- poseStack- The pose stack
- bufferSource- The buffer source where the vertex data should be output
- textureRenderTypeLookup- A function that provides a RenderType for the given texture
- lightmap- The lightmap coordinates representing the current lighting conditions. See- LightTexture
- overlay- The overlay coordinates representing the current overlay status. See- OverlayTexture
- partialTick- The current time expressed in the fraction of a tick elapsed since the last client tick
- context- The context used for rendering
 
- 
withContextWraps the current renderable along with a context. Useful for keeping a list of various renderables paired with their contexts.- Parameters:
- context- The context used for rendering
- Returns:
- A renderable that accepts Unit.INSTANCEas context, but uses the providedcontextinstead
 
 
-