I'm trying to make a data pack with custom items in it but I can't figure out how to detect if someone is hit by an item with a Custom Model Data. I have tried using an advancement, but it seems to make it so whenever I hit someone in general, not just with a stick.
If somebody could find out what's going on I'll be pretty thankful, even if they can't make it for only a stick with a custom model data.
This is the advancement I have currently: