接口 IRenderable<T>

类型参数:
T - The type of context object used by the rendering logic
所有已知实现类:
BakedModelRenderable, CompositeRenderable
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface IRenderable<T>
A standard interface for things that can be rendered to a MultiBufferSource.
  • 方法详细资料

    • 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 provided MultiBufferSource
      参数:
      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
    • withContext

      default IRenderable<Unit> withContext(T context)
      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 provided context instead