Package com.hbm_m.client.render.culling
Class InstancedRenderFrame
java.lang.Object
com.hbm_m.client.render.culling.InstancedRenderFrame
Instanced / MDI batching for OBJ machine parts on vanilla Forge world render stages.
One client render frame = one AFTER_BLOCK_ENTITIES flush + present.
Do not defer draw to Level#getGameTime() — several render frames share one tick,
buffers would fill to the per-part instance cap (ClientRenderFlags.maxInstances())
and machines would strobe (overflow warnings in log).
РЕГРЕССИЯ-СТОП: present here, not AFTER_LEVEL / RenderTickEvent.END
(dirty GL texture units → white lightmap).
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaccumulateSliceInstances(org.joml.Matrix4f projection, net.minecraft.world.phys.Vec3 cameraPos) Deprecated.static voidclear()static voidflushDeferredPresent(org.joml.Matrix4f projection, net.minecraft.world.phys.Vec3 cameraPos) Deprecated.static voidflushPendingNow(org.joml.Matrix4f projection, net.minecraft.world.phys.Vec3 cameraPos) static voidonBeforeBlockEntities(org.joml.Matrix4f projection, net.minecraft.world.phys.Vec3 cameraPos, net.minecraft.client.renderer.culling.Frustum blockEntityFrustum) AFTER_ENTITIES: frustum + CPU occlusion cache before BER.static voidonBeforeBlockEntitySlices(org.joml.Matrix4f projection, net.minecraft.world.phys.Vec3 cameraPos, net.minecraft.client.renderer.culling.Frustum blockEntityFrustum) static voidonRenderFrameBegin(float partialTick, org.joml.Matrix4f projection, net.minecraft.world.phys.Vec3 cameraPos) static voidAFTER_LEVEL: Iris persistent batch cleanup only.static voidpresentAfterBlockEntities(org.joml.Matrix4f projection, net.minecraft.world.phys.Vec3 cameraPos) AFTER_BLOCK_ENTITIES: flush all instanced batches for this render frame.
-
Method Details
-
onBeforeBlockEntities
public static void onBeforeBlockEntities(org.joml.Matrix4f projection, net.minecraft.world.phys.Vec3 cameraPos, @Nullable net.minecraft.client.renderer.culling.Frustum blockEntityFrustum) AFTER_ENTITIES: frustum + CPU occlusion cache before BER. -
presentAfterBlockEntities
public static void presentAfterBlockEntities(org.joml.Matrix4f projection, net.minecraft.world.phys.Vec3 cameraPos) AFTER_BLOCK_ENTITIES: flush all instanced batches for this render frame. -
onRenderSliceEnd
public static void onRenderSliceEnd()AFTER_LEVEL: Iris persistent batch cleanup only. -
onBeforeBlockEntitySlices
@Deprecated public static void onBeforeBlockEntitySlices(org.joml.Matrix4f projection, net.minecraft.world.phys.Vec3 cameraPos, @Nullable net.minecraft.client.renderer.culling.Frustum blockEntityFrustum) -
accumulateSliceInstances
@Deprecated public static void accumulateSliceInstances(org.joml.Matrix4f projection, net.minecraft.world.phys.Vec3 cameraPos) -
onRenderFrameBegin
@Deprecated public static void onRenderFrameBegin(float partialTick, org.joml.Matrix4f projection, net.minecraft.world.phys.Vec3 cameraPos) -
flushDeferredPresent
@Deprecated public static void flushDeferredPresent(org.joml.Matrix4f projection, net.minecraft.world.phys.Vec3 cameraPos) Deprecated. -
flushPendingNow
public static void flushPendingNow(org.joml.Matrix4f projection, net.minecraft.world.phys.Vec3 cameraPos) -
clear
public static void clear()
-
presentAfterBlockEntities(org.joml.Matrix4f, net.minecraft.world.phys.Vec3)