promotional bannermobile promotional banner
premium banner
Silently fixes the "Pose stack not empty" crash in Create: Mobile Packages v0.6.0 when a RoboBee carries a package with no rigging model.

Description

RoboBee Fix

Fixes the Pose stack not empty crash caused by Create: Mobile Packages.


What's happening?

If a RoboBee is carrying a package whose rigging model isn't registered — for example, a package from a mod that Create: Mobile Packages doesn't have a rigging asset for — the game crashes the moment that bee appears on screen. Every time, without fail.


What causes it?

A bug in DroneEntityRenderer in Create: Mobile Packages 0.6.0:

poseStack.pushPose();   // always called

PartialModel partialModel = AllPartialModels.PACKAGE_RIGGING.get(modelKey);
if (partialModel != null) {
    // render rigging...
    poseStack.popPose(); // only called if the model exists!
}
// if partialModel is null: the push leaks every frame → crash

When partialModel is null, popPose() is never called. The PoseStack gains one unbalanced entry per render frame until Minecraft throws Pose stack not empty and crashes.


How does this fix it?

A Mixin patches DroneEntityRenderer.render() at runtime, tracking whether pushPose() was called without a matching popPose(). If the method returns with an unbalanced stack, it calls popPose() automatically — silently keeping everything in order.

Every 5 minutes a status line appears in the log so you can confirm the patch is active:

[RoboBee Fix] Status: 42 pose leaks corrected in the last 5 minutes

Notes

  • This mod patches the symptom at runtime and does not modify the Create: Mobile Packages jar.
  • If CMP ships a fix upstream, this mod becomes a harmless no-op and can be removed.
  • Client-side only.

Created because nobody should lose their RoboBees to a null pointer.