Class MeshBakedGeometry

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

public final class MeshBakedGeometry 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 java.lang.Object

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

    • MeshBakedGeometry

      public MeshBakedGeometry(Mesh mesh)
  • Method Details

    • getMesh

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