Record Class PartGeometry

java.lang.Object
java.lang.Record
com.hbm_m.client.render.PartGeometry

public record PartGeometry(List<net.minecraft.client.renderer.block.model.BakedQuad> solidQuads) extends Record
Один проход BakedModel.getQuads(net.minecraft.world.level.block.state.BlockState, net.minecraft.core.Direction, net.minecraft.util.RandomSource) для multipart-части: общий список квадов (Iris / putBulkData) и построение SingleMeshVboRenderer.VboData из тех же квадов.
  • Field Details

  • Constructor Details

    • PartGeometry

      public PartGeometry(List<net.minecraft.client.renderer.block.model.BakedQuad> solidQuads)
      Creates an instance of a PartGeometry record class.
      Parameters:
      solidQuads - the value for the solidQuads record component
  • Method Details

    • isEmpty

      public boolean isEmpty()
    • compile

      public static PartGeometry compile(net.minecraft.client.resources.model.BakedModel modelPart, String partName)
      Собирает solid-квады; при отсутствии геометрии возвращает EMPTY.
    • collectSolidQuads

      public static List<net.minecraft.client.renderer.block.model.BakedQuad> collectSolidQuads(net.minecraft.client.resources.model.BakedModel modelPart, String partName)
      Детерминированный обход граней (тот же RNG/seed на каждый вызов getQuads).
    • toVboData

      public SingleMeshVboRenderer.VboData toVboData(String partName)
      VBO из уже собранных квадов (без повторного getQuads). bone_id в вершинах = 0 (статика / кольцо).
    • toVboData

      public SingleMeshVboRenderer.VboData toVboData(String partName, int perVertexBoneId)
      Parameters:
      perVertexBoneId - индекс кости для instanced GPU skinning (0=base, 1=lower arm, …); см. MachineAdvancedAssemblerRenderer и block_lit.vsh.
    • buildVboDataFromQuads

      public static SingleMeshVboRenderer.VboData buildVboDataFromQuads(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, String partName)
    • buildVboDataFromQuads

      public static SingleMeshVboRenderer.VboData buildVboDataFromQuads(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, String partName, int perVertexBoneId)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • solidQuads

      public List<net.minecraft.client.renderer.block.model.BakedQuad> solidQuads()
      Returns the value of the solidQuads record component.
      Returns:
      the value of the solidQuads record component