{
  "parent": "manic:technical/root",
  "criteria": {
    "used_lodestone": {
      "trigger": "minecraft:item_used_on_block",
      "conditions": {
        "player": [
          {
            "condition": "minecraft:any_of",
            "terms": [
              {
                "condition": "minecraft:entity_properties",
                "entity": "this",
                "predicate": {
                  "equipment": {
                    "mainhand": {
                      "items": [
                        "minecraft:compass"
                      ],
                      "nbt": "{manic:{id:\"grimstone_compass\"}}"
                    }
                  }
                }
              },
              {
                "condition": "minecraft:entity_properties",
                "entity": "this",
                "predicate": {
                  "equipment": {
                    "offhand": {
                      "items": [
                        "minecraft:compass"
                      ],
                      "nbt": "{manic:{id:\"grimstone_compass\"}}"
                    }
                  }
                }
              }
            ]
          }
        ],
        "location": [
          {
            "condition": "minecraft:block_state_property",
            "block": "minecraft:lodestone",
            "properties": {}
          }
        ]
      }
    },
    "changed_dimension": {
      "trigger": "minecraft:changed_dimension",
      "conditions": {
        "player": [
          {
            "condition": "minecraft:entity_properties",
            "entity": "this",
            "predicate": {
              "nbt": "{Tags:[\"manic.player.has_grimstone_compass\"]}"
            }
          }
        ]
      }
    }
  },
  "requirements": [
    [
      "changed_dimension",
      "used_lodestone"
    ]
  ],
  "rewards": {
    "function": "manic:item/grimstone_compass/inventory/rebind_compass"
  }
}
