promotional bannermobile promotional banner

Death Detangler

A Forge 1.20.1 compatibility mod that prevents “downed player” clone leaks and keeps Hardcore Revival, corpse/grave mods, and Curios working together safely.

File Details

death_detangler-1.2.2.jar

  • R
  • Feb 7, 2026
  • 75.53 KB
  • 11.3K
  • 1.20.1
  • Forge

File Name

death_detangler-1.2.2.jar

Supported Versions

  • 1.20.1

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:death-detangler-1413428:7588597")
Curse Maven does not yet support mods that have disabled 3rd party sharing

Learn more about Curse Maven

Fixes:

Fixed Curios Items Staying Equipped After Death
- **Bug**: Curios items (Artifacts, Cosmetic Armour, etc.) were staying equipped on the respawned player instead of being dropped or transferred to the corpse
- **Cause**: Death Detangler was calling `player.remove()` in `LivingDeathEvent` at HIGHEST priority, which invalidated the player's capabilities *before* Corpse mod and Corpse x Curios API Compat could read the inventory
- **Solution**:
  1. Removed the pre-emptive `player.remove()` call from `onLivingDeath` – the player now stays valid so Corpse/Curios can read their inventory
  2. Updated `PlayerCloneEventMixin` to set removal reason via reflection only (no `remove()` call) so the original stays valid for other Clone handlers
  3. Excluded Curios/Artifacts/Cosmetic Armour capabilities from `ModPlayerReferenceCleaner` – we no longer touch their holder references

Compatibility:
- **Curios API**: Full compatibility – items now correctly transfer to corpse with Corpse x Curios API Compat
- **Artifacts**: Full compatibility – artifact slots handled correctly on death
- **Cosmetic Armour**: Full compatibility – cosmetic slots handled correctly on death
- **Corpse x Curios API Compat**: Recommended when using Corpse + Curios together

Technical Details:

- **Event Order**: Corpse mod and Curios handlers must read from the original player during `LivingDeathEvent`. Calling `remove()` invalidated capabilities before they could read.
- **Removal Reason**: Still set for AllTheLeaks compatibility via the mixin (reflection only during Clone event).
- **Capability Cleanup**: Curios, artifact, cosmetic, and relic capability instances are now skipped in reference cleanup.

Master Manager Design:

- **Works with or without** Corpse, Gravestones, Curios – no death-inventory mod required
- **Recognizes installed mods** at startup: Corpse, GraveStone Mod, Enigmatic Graves, Curios, Corpse x Curios Compat, Corpse x Cosmetic Armour Compat, Gravestone x Curios Compat, Relics (+ Artifacts/Alex's Caves Compat)
- New API methods: `hasCorpse()`, `hasGravestone()`, `hasCurios()`, `hasGravestoneCuriosCompat()`, `hasRelics()`, `getDetectedDeathInventoryMods()`

Additional Compatibility:

- **Gravestone x Curios API Compat**: Curios items transfer to gravestone
- **Relics, Relics: Artifacts Compat, Relics: Alex's Caves Compat**: Recognized; Relics/Artifacts use Curios slots

Improvements:

- **Reduced log spam**: Periodic cleanup disabled by default (`cleanIntervalTicks` = 0). Cleanup runs only on server start, player death/clone, and logout. Startup scan logs only when orphans are removed.