Totem Lifecycle Slot Handler

Inventory_Totem_Lifecycle Inventory HIGH +8 score

🎮 Minecraft Gameplay Impact

Monitors totem destruction events (EntityStatusS2SPacket status 35) or health drop thresholds to immediately pre-fill the offhand before damage resolves.

🔍 Functions & APIs Analyzed

EntityStatusS2SPacket

Packet signalling totem activation animation.

ClientPlayerInteractionManager.clickSlot

Transfers totem into slot 45.

💻 Mod Implementation (Dev Source / Mapped)

// Developer Source (Fabric / Yarn mappings)
public class TotemLifecycle {
    public static void onTotemPop(MinecraftClient client) {
        swapTotemToOffhand(client);
    }
}

⚙️ Decompiled Representation (Vineflower View)

// Decompiled with Vineflower 1.12 (Intermediary mappings)
public class TotemLifecycle {
    public static void onTotemPop(class_310 client) {
        swapTotemToOffhand(client);
    }
}

🛡️ Bytecode Signature & Static Detection

Detects totem item references coupled with inventory window sync IDs and slot swapping logic.