Custom advancements not working.
I am working on a datapack where you can get a wand which will emit an effect when right clicked, however I can't seem to be able to get the click detection via advancements to work. I have basically added an advancement which should trigger whenever a player eats/uses an item which then in turn triggers a function. I have tested the advancement on it's own by granting it to the player which works, however when I eat something it doesn't trigger the advancement. The code I have currently written is visible in the images added to the post. What could be the reason that it isn't functioning?
Continue to help post