life saver banner
life saver icon

life saver

Create a mod like when the player is frequently attacked or half one heart it teleport the player automatically at the spawn point without losing...

00
neoforgeBoth1.21.1mod

life saver mod

  • Purpose: Automatically teleports a player to their spawn point (bed/respawn anchor target if valid, otherwise world spawn) when they are in danger so they keep their inventory and avoid death.
  • Triggers: Fired when incoming damage would drop health to half a heart or less, or when the player takes 3 hits within 5 seconds. The rescue ignores players in creative/spectator mode and has a 10 second cooldown between teleports.
  • Behavior: The dangerous hit is canceled, the player is sent to their spawn location with fall distance reset, fire cleared, and health lifted to at least half of their maximum. A chat message explains why they were moved.
  • Tech notes: Uses server-side damage events only, so packets and shared code stay free of client-only classes. Respawn targeting prefers the player's set respawn dimension/position; fallback is the overworld spawn.
  • Possible improvements: Make thresholds/configuration adjustable, add a brief protection effect after teleporting, or surface a UI toggle per player.