Interface Mesh
- 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 TypeMethodDescriptionvoid
Use to access all the quads encoded in this mesh.void
outputTo
(QuadEmitter emitter) Outputs all quads in this mesh to the given quad emitter.@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int
size()
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
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
Outputs all quads in this mesh to the given quad emitter.
-