Class MeshQuadCollection

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

public final class MeshQuadCollection extends net.minecraft.client.resources.model.geometry.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 quad lists from inherited methods. Other public methods, including QuadCollection.materialFlags() and QuadCollection.hasMaterialFlag(int), will return expected values computed from the mesh.

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

  • Nested Class Summary

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

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

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

    EMPTY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

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

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

    getAll, getQuads, hasMaterialFlag

    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.
    • materialFlags

      public int materialFlags()
      Overrides:
      materialFlags in class net.minecraft.client.resources.model.geometry.QuadCollection