Lives
Life System for Minecraft
This Fabric mod introduces a limited lives mechanic for each player. The current number of remaining attempts is displayed in the top left corner of the screen. When all lives are exhausted, you'll be presented with a choice: switch to spectator mode or exit the world (permadeath).

Life Count Configuration
By default, 3 lives are set, but you can easily change this value in the lives.json configuration file. Configure any number of lives according to your preference - from one to infinity.

Compatibility and Features
The mod works in both single-player and multiplayer modes. The life count is saved at the world level. Important warning: do not use this mod with hardcore mode! Otherwise, you won't be able to respawn.
The "hardcore" and "hard" difficulty settings are technically identical - the only difference is the permadeath system. If you want to create an authentic hardcore experience, simply enable regular hard mode with this mod and add hardcore heart textures.
The mod is fully functional and compatible with 99% of other modifications. It works on any difficulty, including peaceful - although it's hard to imagine why anyone would need lives in such a mode.