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?
#Any way (without custom enchants) to run a function as the attacked entity in an advancement?
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
Someone will come and help soon!
💬 While you wait, take this time to provide more context and details.
🙇 If nobody has answered you by <t:1746469446:t>, feel free to use the Summon Helpers button to ping our helper team.
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
You'd need the reward function to run a new execute command that executed as the nearest entity with a HurtTime NBT that is not 0. Can include a raycast for extra accuracy if needed
Ah ok, thanks