Package com.hbm_m.client.render
Class MeshRenderCache
java.lang.Object
com.hbm_m.client.render.MeshRenderCache
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear()static voidclearAll()static intstatic intstatic intstatic List<net.minecraft.client.renderer.block.model.BakedQuad>getOrCompile(Class<?> modelClass, String partName, net.minecraft.client.resources.model.BakedModel modelPart) static List<net.minecraft.client.renderer.block.model.BakedQuad>getOrCompile(String entityType, String partName, net.minecraft.client.resources.model.BakedModel modelPart) static List<net.minecraft.client.renderer.block.model.BakedQuad>getOrCompile(String cacheKey, net.minecraft.client.resources.model.BakedModel modelPart) static PartGeometrygetOrCompilePartGeometry(String entityType, String partName, net.minecraft.client.resources.model.BakedModel modelPart) static PartGeometrygetOrCompilePartGeometry(String cacheKey, net.minecraft.client.resources.model.BakedModel modelPart) Один кэшированный проход getQuads + общий список для Iris/VBO.static com.mojang.blaze3d.vertex.VertexBuffergetOrCreateGPUBuffer(String entityType, String partName, net.minecraft.client.resources.model.BakedModel modelPart) static com.mojang.blaze3d.vertex.VertexBuffergetOrCreateGPUBuffer(String cacheKey, net.minecraft.client.resources.model.BakedModel modelPart) static IrisCompanionMeshgetOrCreateIrisCompanion(String cacheKey, List<net.minecraft.client.renderer.block.model.BakedQuad> quads) Variant that builds the companion mesh from an explicit quad list (used when the caller has already collected/cached the quads viaPartGeometry).static IrisCompanionMeshgetOrCreateIrisCompanion(String cacheKey, net.minecraft.client.resources.model.BakedModel modelPart) Lazily build (or fetch) a companion mesh holding the given part's geometry in Iris-extendedNEW_ENTITY/IrisVertexFormats.ENTITYformat.static SingleMeshVboRenderergetOrCreateRenderer(String entityType, String partName, net.minecraft.client.resources.model.BakedModel model) static SingleMeshVboRenderergetOrCreateRenderer(String partKey, net.minecraft.client.resources.model.BakedModel model) static SingleMeshVboRenderergetOrCreateRendererFromQuadList(String partKey, List<net.minecraft.client.renderer.block.model.BakedQuad> quads) ОдинSingleMeshVboRendererиз явного списка квадов (например merge нескольких частей).static void
-
Constructor Details
-
MeshRenderCache
public MeshRenderCache()
-
-
Method Details
-
getOrCompile
-
getOrCompile
-
getOrCompilePartGeometry
public static PartGeometry getOrCompilePartGeometry(String cacheKey, net.minecraft.client.resources.model.BakedModel modelPart) Один кэшированный проход getQuads + общий список для Iris/VBO. -
getOrCreateGPUBuffer
public static com.mojang.blaze3d.vertex.VertexBuffer getOrCreateGPUBuffer(String cacheKey, net.minecraft.client.resources.model.BakedModel modelPart) -
getOrCreateRenderer
public static SingleMeshVboRenderer getOrCreateRenderer(String partKey, net.minecraft.client.resources.model.BakedModel model) -
getOrCompile
-
getOrCompilePartGeometry
public static PartGeometry getOrCompilePartGeometry(String entityType, String partName, net.minecraft.client.resources.model.BakedModel modelPart) -
getOrCreateGPUBuffer
-
getOrCreateRenderer
public static SingleMeshVboRenderer getOrCreateRenderer(String entityType, String partName, net.minecraft.client.resources.model.BakedModel model) -
getOrCreateRendererFromQuadList
public static SingleMeshVboRenderer getOrCreateRendererFromQuadList(String partKey, List<net.minecraft.client.renderer.block.model.BakedQuad> quads) ОдинSingleMeshVboRendererиз явного списка квадов (например merge нескольких частей). Квады копируются в immutable-список для Iris-пути; ключ должен быть уникален в рамках кэша. -
getOrCreateIrisCompanion
public static IrisCompanionMesh getOrCreateIrisCompanion(String cacheKey, net.minecraft.client.resources.model.BakedModel modelPart) Lazily build (or fetch) a companion mesh holding the given part's geometry in Iris-extendedNEW_ENTITY/IrisVertexFormats.ENTITYformat. Returnsnullwhen there is no geometry to upload. -
getOrCreateIrisCompanion
public static IrisCompanionMesh getOrCreateIrisCompanion(String cacheKey, List<net.minecraft.client.renderer.block.model.BakedQuad> quads) Variant that builds the companion mesh from an explicit quad list (used when the caller has already collected/cached the quads viaPartGeometry). -
clear
public static void clear() -
clearAll
public static void clearAll() -
getCachedQuadsCount
public static int getCachedQuadsCount() -
getCachedBuffersCount
public static int getCachedBuffersCount() -
getCachedRenderersCount
public static int getCachedRenderersCount() -
logCacheStats
public static void logCacheStats()
-