detecting right clicks

so i have a datapack setup and this is what the direcotry looks like

datapack/
  pack.mcmeta
  data/
    minecraft/
    namespace/
      advancements/
        click_food.json
      functions/
        warps_clicks.mcfunction

click_food.json:

{
  "criteria": {
    "requirement": {
      "trigger": "minecraft:using_item",
      "conditions": {
        "item": {
          "items": [
            "minecraft:compass"
          ],
          "predicates": {
            "minecraft:custom_data": {"warps_compass": 1}
          }
        }
      }
    }
  },
  "rewards": {
    "function": "namespace:warps_click"
  }
}

warps_click.mcfunction:

say You right clicked on the warps compass

this is just a placeholder someone please help 😄

Continue to help post