Topic category: Help with Minecraft modding (Java Edition)
So, i've been working on an item which, in nutshell, changes your HP to your current hp + 1 or 2 (based on your current health) upon hitting something.
but it just doesn't work...?
I'll write here how the procedure looks.
if Current health of Event/target entity > 10
do Set health of Event/target entity to Current health of Event/target entity + 1
else Set health of Event/target entity to Current health of Event/target entity + 2
It is supposed to give me HP upon hitting something, but it instead heals the one im hitting... i tried exchanging Event/target with Source entity, but then it didn't heal anyone, not even me, not even the one i'm hitting.
Can someone help?
To be exact, this procedure is to be set for the trigger "When living entity is hit with tool"
If it just doesn't work this way, could someone at least share if there is a way to add a specific amount of HP to someone when hitting an entity (without using potion effects)?
someone please :c
As i have mentioned, i tried both ways, once using source and once target.
With target, again as i mentioned, it healed the one i was hitting, but with source.. it didnt heal anyone, not even the one i was hitting, not me either.
attach your procedure and I will help you fix it
If oyu want it to be random you can do that :
i know what the number does, that's why i set it like that
the problem isn't i don't know what to do, it isn't that i want it random or anything, the problem here is that when i put Source Entity there, it heals noone, not me, not the one im hitting.