Hardcore Lives
This Fabric mod introduces a lives system to hard mode gameplay. The number of remaining lives is displayed in the top left corner of the screen. When all lives run out, the player is prompted to switch to spectator mode or exit the world.
Number of Lives
By default, 3 lives are set. You can change this number by unpacking the mod, navigating to hardcore-lives → config → lives.json and setting the desired number of lives (note: changing the number of lives might reset the counter on existing worlds, this hasn't been fully tested yet).
Illustration:

Operation Features
The mod works equally in singleplayer and multiplayer games, with life data stored within the world.
IMPORTANT: Do not create actual hardcore worlds! In such mode, the ability to respawn will be blocked.
Development Prospects
If the mod gains popularity, plans include adding the ability to disable the lives interface through a keybind, as well as fixing existing issues.
Compatibility
Currently, the mod is fully functional and compatible with 99% of other modifications.
Report any issues found in the comments.
Additional information:
