Class MeshBakedGeometry

java.lang.Object
net.minecraft.client.render.model.BakedGeometry
net.fabricmc.fabric.api.renderer.v1.model.MeshBakedGeometry

public final class MeshBakedGeometry extends BakedGeometry
A special BakedGeometry which hides a Mesh instead of using BakedQuads. Useful for custom implementations of Geometry.bake(ModelTextures, Baker, ModelBakeSettings, SimpleModel) that want to return a mesh. Instances of this class always return empty lists from inherited methods.

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

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