-
Notifications
You must be signed in to change notification settings - Fork 12
Addon Examples
Leo-T22 edited this page Jun 27, 2026
·
1 revision
RagdollKeybindExample in the source is a worked end-to-end example showing an
on-foot pose and an elytra pose built with the public API.
RagdollAPI.remove(level, clickedSubLevelId, true);Passing an attached part UUID removes the whole ragdoll. Passing a severed limb UUID removes only that loose limb.
UUID limbId = RagdollAPI.dismember(level, clickedPartSubLevelId);
if (limbId != null) {
// The limb is now an independent free body.
}UUID limbId = RagdollAPI.dismemberMob(level, clickedPartSubLevelId);
if (limbId != null) {
// The limb is now an independent free body.
}RagdollEquipmentSnapshot snapshot =
RagdollAPI.captureEquipment(player, RagdollEquipmentScope.ALL);
PlayerlessRagdollSession corpse =
RagdollAPI.detachActive(player, PlayerlessDespawnRule.never());
if (corpse != null) {
RagdollAPI.applyEquipmentSnapshot(level, corpse.id(), snapshot);
}