Class BatchedMaterialGroup

java.lang.Object
com.jozufozu.flywheel.backend.instancing.batching.BatchedMaterialGroup
All Implemented Interfaces:
MaterialGroup

public class BatchedMaterialGroup extends Object implements MaterialGroup
  • Field Details

    • state

      protected final net.minecraft.client.renderer.RenderType state
  • Constructor Details

    • BatchedMaterialGroup

      public BatchedMaterialGroup(net.minecraft.client.renderer.RenderType state)
  • Method Details

    • material

      public <D extends InstanceData> BatchedMaterial<D> material(StructType<D> type)
      Description copied from interface: MaterialGroup
      Get the material as defined by the given type.
      Specified by:
      material in interface MaterialGroup
      Type Parameters:
      D - The type representing the per instance data.
      Parameters:
      type - The material you want to create instances with.
      Returns:
      A material you can use to render models.
    • render

      public void render(com.mojang.blaze3d.vertex.PoseStack stack, BatchDrawingTracker source, TaskEngine pool)
    • clear

      public void clear()
    • delete

      public void delete()
    • getInstanceCount

      public int getInstanceCount()
      Get the number of instances drawn last frame.
      Returns:
      The instance count.
    • getVertexCount

      public int getVertexCount()
      Get the number of vertices drawn last frame.
      Returns:
      The vertex count.