Package com.hbm_m.client.render
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPartGeometry(List<net.minecraft.client.renderer.block.model.BakedQuad> solidQuads) Creates an instance of aPartGeometryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuildVboDataFromQuads(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, String partName) buildVboDataFromQuads(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, String partName, int perVertexBoneId) static List<net.minecraft.client.renderer.block.model.BakedQuad>collectSolidQuads(net.minecraft.client.resources.model.BakedModel modelPart, String partName) Детерминированный обход граней (тот же RNG/seed на каждый вызов getQuads).static PartGeometryСобирает solid-квады; при отсутствии геометрии возвращаетEMPTY.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisEmpty()List<net.minecraft.client.renderer.block.model.BakedQuad>Returns the value of thesolidQuadsrecord component.final StringtoString()Returns a string representation of this record class.VBO из уже собранных квадов (без повторного getQuads).
-
Field Details
-
BAKE_SEED
public static final long BAKE_SEED- See Also:
-
EMPTY
-
-
Constructor Details
-
PartGeometry
Creates an instance of aPartGeometryrecord class.- Parameters:
solidQuads- the value for thesolidQuadsrecord 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
VBO из уже собранных квадов (без повторного getQuads).bone_idв вершинах = 0 (статика / кольцо). -
toVboData
- 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
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
solidQuads
Returns the value of thesolidQuadsrecord component.- Returns:
- the value of the
solidQuadsrecord component
-