Datapack for regeneration if under 4 hearts.
**Can anyone script me a datapack of a mod that when you are under 4 hearts it would give you regeneration 1, and if under 3 it would give you regen 2 and then it would scale down lo half a heart. Or if anyone knows any mod that would be awesome.**
*Have a great day and thanks for your attention*
*Have a great day and thanks for your attention*
Commentaires
*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/Minecraft) if you have any questions or concerns.*
* Downvote this comment if this post is poor quality or does not fit the purpose of r/Minecraft
* Downvote this comment *and report the post* if it breaks the [rules](https://www.reddit.com/r/Minecraft/wiki/rules)
----
(*Vote has already ended*)
# In chat
scoreboard objectives add health Health
# Command blocks
effect give @a[scores={health=7..8}] regeneration 1 0
effect give @a[scores={health=5..6}] regeneration 1 1
effect give @a[scores={health=3..4}] regeneration 1 2
effect give @a[scores={health=..2}] regeneration 1 3
```