Any way (without custom enchants) to run a function as the attacked entity in an advancement?
I'm making a datapack that allows you to craft tipped swords by crafting a sword with a lingering potion, and attacking an entity should give that entity a small amount of that potion effect. I'm able to detect the player attacking with one of these swords via advancements, but I have no idea how to detect what entity is taking damage in order to apply the effect. Any suggestions?
Continue to help post