Class MeshQuadCollection

java.lang.Object
net.minecraft.client.resources.model.QuadCollection
net.fabricmc.fabric.api.client.renderer.v1.model.MeshQuadCollection

public final class MeshQuadCollection extends net.minecraft.client.resources.model.QuadCollection
A special QuadCollection which hides a Mesh instead of using BakedQuads. Useful for custom implementations of UnbakedGeometry.bake(TextureSlots, ModelBaker, ModelState, ModelDebugName) that want to return a mesh. Instances of this class always return empty lists from inherited methods.

Any code that interacts with QuadCollection should first check instanceof MeshBakedGeometry and use getMesh() if true or the vanilla methods otherwise.

  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.client.resources.model.QuadCollection

    net.minecraft.client.resources.model.QuadCollection.Builder
  • Field Summary

    Fields inherited from class net.minecraft.client.resources.model.QuadCollection

    EMPTY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets this geometry's mesh.

    Methods inherited from class net.minecraft.client.resources.model.QuadCollection

    getAll, getQuads

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MeshQuadCollection

      public MeshQuadCollection(Mesh mesh)
  • Method Details

    • getMesh

      public Mesh getMesh()
      Gets this geometry's mesh. Always use this method instead of vanilla methods when available.