Hello Everyone! I was working on a few things on my realm on 1.13.1. one of them being trying to detect when a player hits an entity with command block. I searched all over the internet but found nothing that could help me. If you know how to do this please explain it to me XD.
Hello Everyone! I was working on a few things on my realm on 1.13.1. one of them being trying to detect when a player hits an entity with command block. I searched all over the internet but found nothing that could help me. If you know how to do this please explain it to me XD.
/execute as @a[nbt={Health:20f}] run say I'm full health
this will make all players with full health say "I'm full health" in chat so change the "say I'm full health" to whatever you want
to track low health simply change value 20 to whatever health is low in your eyes, half a heart is {Health:1f} and so on...
you might want several command blocks checking for different amounts of health, since you can only track one specific number not a range
Visit my website to see/download my datapacks!
https://qualthorn.wixsite.com/datapacks