Started by
Mr.Straw
on
Topic category: Help with Minecraft modding (Java Edition)
I would like to create a sword enchantment that restores one HP to the player with a certain chance at level 1 if the player deals damage to undead. However, I did not find any block of the procedure that would exactly restore health. I tried to do it through negative damage, but it didn't work. I also wanted to do it through the NBT tag, but my head is exploding from thinking about how to do it. Is there any way to restore a certain amount of health points? If anything, I would not want to do it through the effects of regeneration or instant health recovery.
(Set (event/target entity) HP to ((get HP of (event/target entity) + (1)))
You will need to swap out parts of the procedure block to get this result, you also might need to swap event/target entity for sourceentity depending on what trigger you use