接口 IRenderable<T>
- 类型参数:
T
- The type of context object used by the rendering logic
- 所有已知实现类:
BakedModelRenderable
,CompositeRenderable
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
A standard interface for things that can be rendered to a
MultiBufferSource
.-
方法概要
修饰符和类型方法说明void
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
default IRenderable
<Unit> withContext
(T context) Wraps the current renderable along with a context.
-
方法详细资料
-
render
void 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
- 参数:
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
Wraps the current renderable along with a context. Useful for keeping a list of various renderables paired with their contexts.- 参数:
context
- The context used for rendering- 返回:
- A renderable that accepts
Unit.INSTANCE
as context, but uses the providedcontext
instead
-