Description
Summary: Deaths limit your maximum food, and if you die too many times, spirits will spawn to harass you. Sleeping has a chance to reduce the penalty, and golden apples increase this chance.
This does not add mobs, blocks or items.
Made with mcreator and has no requirements. English and Spanish. Only 1.20.1 forge.
Use it in modpacks. No attribution required.
This mod is designed to be annoying, but not too much. It adds a death counter that increases when you die and decreases when you sleep. I made it for my own playthroughs. One way I used to kill Ice and Fire dragons was by crafting many stone swords and slowly weakening them, respawning nearby. With this mod, that would be a terrible idea. On the other hand, I sometimes play with Keep Inventory, and I don’t want death to be free of consequences.
The counter reduces the player's maximum food by 1 drumstick for each death, up to a maximum of 7 drumsticks. When the counter is 7 or higher, the player's maximum drumsticks will be 3.
The first 4 levels of the counter also reduce the player's maximum saturation. Once the counter reaches 4 or higher, the maximum saturation will be 0.
When the counter hits 8 or higher, "void vex" will occasionally spawn to hunt you down. They don’t hit hard but push you around and are annoying. They die with one hit. The higher the counter, the more frequent and varied the vexes become.
The first type (which spawns at death level 8) only deals damage when hitting you, and the counter increases that damage. When the counter reaches 9, 10, 11, 12, and 13, other types of vexes will appear, which deal very little damage but apply Slowness, Weakness, Nausea, Blindness, and Wither, respectively. The counter increases the duration of these effects.
The death counter does not increase linearly, it is set so that you reach level 7 with a maximum of 3 deaths.
counter at {0} -> +4
counter at {1,2} -> +3
counter at {3,4,5} -> +2
This is how damage type looks, those that have effects look similar but are accompanied by a colored particle to indicate the effect they cause:

When you sleep, there's a chance the counter will decrease by 1. This chance improves by consuming golden apples. The approximate probabilities are:
0 golden apples: 40%
1 golden apple: 80%
2 golden apples: ~94%
3 or more is almost guaranteed.
If the healing attempt fails, the golden apple counter doesn’t decrease, and you can try again the next night. If healing is successful, the golden apple counter resets to 0.
Enchanted golden apples have the special ability to extend the success chance across multiple healings. If healing is successful, the golden apple counter stays intact for the next healing attempt.
You can lie down and get up instantly to try healing. The cooldown for healing is one standard Minecraft day (aprox. the sunlight part).
There is a command I used in the debug process:
/deathstackpenalties [target] [number]
Where "target" is target and "number" does the following:
0 or more : makes the target have this level of deaths.
-1 : tells the target's level of deaths.
-2 : sets the cooldown between healing attempts to 0.
-3 : sets the cooldown between vex spawns to 0.
I always had the possibility of using it in multiplayer in mind during development, so in theory it should work, but I haven't had the chance to test it there.


