Universal Totem is a Fabric mod for Minecraft 1.21.1 that makes any item held in the player's main hand behave like a Totem of Undying when the player would otherwise die.
When a player takes fatal damage:
- Vanilla Totem of Undying still has priority if one is present in either hand.
- If no real totem activates, the mod checks the player's main hand.
- If the main-hand stack is not empty, the player is saved.
- Exactly one item is consumed from the held stack.
- The vanilla-style death protection effects are applied:
- Health set to 1 HP
- Regeneration II
- Absorption
- Fire Resistance
- Burning is cleared
- Vanilla totem particles and sound are triggered.
- The floating activation animation shows the actual consumed item, not a totem.
The custom mechanic does not activate for:
- Empty main hand
- Creative mode players
- Spectator mode players
- Damage sources that also bypass vanilla Totem of Undying protection
src/main/java/com/slimeeystudios/universaltotem/UniversalTotemMod.java– common mod initializersrc/main/java/com/slimeeystudios/universaltotem/UniversalTotemClient.java– client packet registrationsrc/main/java/com/slimeeystudios/universaltotem/mixin/LivingEntityMixin.java– death protection logicsrc/main/java/com/slimeeystudios/universaltotem/network/– custom animation payload handlingsrc/main/resources/fabric.mod.json– Fabric metadatasrc/main/resources/universaltotem.mixins.json– mixin config
Use a Java 21+ Gradle environment.
gradle buildgradle runClientThe mod is implemented with a mixin into vanilla death-protector logic so that a real Totem of Undying always activates first. A small custom S2C packet then replaces the floating totem item with the exact consumed stack on the saved player's client.