All Known Subinterfaces:
MutableMesh

public interface Mesh
A bundle of QuadView instances encoded by the renderer, typically via MutableMesh.immutableCopy().

Similar in purpose to the List<BakedQuad> instances returned by BakedModel.getQuads(BlockState, Direction, Random), but allows the renderer to optimize the format for performance and memory allocation.

All declared methods in this interface are thread-safe and can be used concurrently.

Only the renderer should implement or extend this interface.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    forEach(Consumer<? super QuadView> action)
    Use to access all the quads encoded in this mesh.
    void
    Outputs all quads in this mesh to the given quad emitter.
    @org.jetbrains.annotations.Range(from=0L, to=2147483647L) int
    Returns the number of quads encoded in this mesh.
  • Method Details

    • size

      @org.jetbrains.annotations.Range(from=0L, to=2147483647L) int size()
      Returns the number of quads encoded in this mesh.
    • forEach

      void forEach(Consumer<? super QuadView> action)
      Use to access all the quads encoded in this mesh. The quad instance sent to the consumer should never be retained outside the current call to the consumer.
    • outputTo

      void outputTo(QuadEmitter emitter)
      Outputs all quads in this mesh to the given quad emitter.