Interface FabricLayerRenderState


public interface FabricLayerRenderState
Note: This interface is automatically implemented on ItemStackRenderState.LayerRenderState via Mixin and interface injection.
  • Method Summary

    Modifier and Type
    Method
    Description
    default QuadEmitter
    Retrieves the QuadEmitter used to append quads to this layer.
    default void
    Sets the function that chooses the RenderType for quads added to this layer through emitter() based on certain quad properties.
  • Method Details

    • emitter

      default QuadEmitter emitter()
      Retrieves the QuadEmitter used to append quads to this layer. Calling this method a second time invalidates any prior result. Geometry added to this emitter will not be visible in ItemStackRenderState.LayerRenderState.prepareQuadList() and will be rendered after any ItemStackRenderState.LayerRenderState.prepareQuadList() vanilla quads} when this layer is rendered. Vertex positions of geometry added to this emitter will automatically be output on ItemStackRenderState.visitExtents(Consumer) (ItemStackRenderState.LayerRenderState.setExtents(Supplier) must still be used to add positions of vanilla quads). Adding quads that use animated sprites to this emitter will not automatically call ItemStackRenderState.setAnimated(). Any quads added to this emitter will be cleared on ItemStackRenderState.LayerRenderState.clear().

      Do not retain references outside the context of this layer.

    • setRenderTypeGetter

      default void setRenderTypeGetter(ItemRenderTypeGetter renderTypeGetter)
      Sets the function that chooses the RenderType for quads added to this layer through emitter() based on certain quad properties. This method has no effect on how vanilla quads are rendered. If this function is not set, all non-vanilla quads in this layer will be rendered using this layer's default render type. If the function returns null for a certain combination of quad properties, then all non-vanilla quads with matching property values will use this layer's default render type. This layer's function will be unset on ItemStackRenderState.LayerRenderState.clear().
      See Also: