{
  "parent": "minecraft:nether/root",
  "criteria": {
    "distract_piglin": {
      "conditions": {
        "entity": [
          {
            "condition": "minecraft:entity_properties",
            "entity": "this",
            "predicate": {
              "type": "minecraft:piglin",
              "flags": {
                "is_baby": false
              }
            }
          }
        ],
        "item": {
          "tag": "minecraft:piglin_loved"
        },
        "player": [
          {
            "condition": "minecraft:inverted",
            "term": {
              "condition": "minecraft:entity_properties",
              "entity": "this",
              "predicate": {
                "equipment": {
                  "head": {
                    "items": [
                      "minecraft:golden_helmet"
                    ]
                  }
                }
              }
            }
          },
          {
            "condition": "minecraft:inverted",
            "term": {
              "condition": "minecraft:entity_properties",
              "entity": "this",
              "predicate": {
                "equipment": {
                  "chest": {
                    "items": [
                      "minecraft:golden_chestplate"
                    ]
                  }
                }
              }
            }
          },
          {
            "condition": "minecraft:inverted",
            "term": {
              "condition": "minecraft:entity_properties",
              "entity": "this",
              "predicate": {
                "equipment": {
                  "legs": {
                    "items": [
                      "minecraft:golden_leggings"
                    ]
                  }
                }
              }
            }
          },
          {
            "condition": "minecraft:inverted",
            "term": {
              "condition": "minecraft:entity_properties",
              "entity": "this",
              "predicate": {
                "equipment": {
                  "feet": {
                    "items": [
                      "minecraft:golden_boots"
                    ]
                  }
                }
              }
            }
          }
        ]
      },
      "trigger": "minecraft:thrown_item_picked_up_by_entity"
    },
    "distract_piglin_directly": {
      "conditions": {
        "entity": [
          {
            "condition": "minecraft:entity_properties",
            "entity": "this",
            "predicate": {
              "type": "minecraft:piglin",
              "flags": {
                "is_baby": false
              }
            }
          }
        ],
        "item": {
          "items": [
            "minecraft:gold_ingot"
          ]
        },
        "player": [
          {
            "condition": "minecraft:inverted",
            "term": {
              "condition": "minecraft:entity_properties",
              "entity": "this",
              "predicate": {
                "equipment": {
                  "head": {
                    "items": [
                      "minecraft:golden_helmet"
                    ]
                  }
                }
              }
            }
          },
          {
            "condition": "minecraft:inverted",
            "term": {
              "condition": "minecraft:entity_properties",
              "entity": "this",
              "predicate": {
                "equipment": {
                  "chest": {
                    "items": [
                      "minecraft:golden_chestplate"
                    ]
                  }
                }
              }
            }
          },
          {
            "condition": "minecraft:inverted",
            "term": {
              "condition": "minecraft:entity_properties",
              "entity": "this",
              "predicate": {
                "equipment": {
                  "legs": {
                    "items": [
                      "minecraft:golden_leggings"
                    ]
                  }
                }
              }
            }
          },
          {
            "condition": "minecraft:inverted",
            "term": {
              "condition": "minecraft:entity_properties",
              "entity": "this",
              "predicate": {
                "equipment": {
                  "feet": {
                    "items": [
                      "minecraft:golden_boots"
                    ]
                  }
                }
              }
            }
          }
        ]
      },
      "trigger": "minecraft:player_interacted_with_entity"
    }
  },
  "display": {
    "announce_to_chat": true,
    "description": {
      "translate": "advancements.nether.distract_piglin.description"
    },
    "frame": "task",
    "hidden": false,
    "icon": {
      "item": "minecraft:gold_ingot"
    },
    "show_toast": true,
    "title": {
      "translate": "advancements.nether.distract_piglin.title"
    }
  },
  "requirements": [
    [
      "distract_piglin",
      "distract_piglin_directly"
    ]
  ]
}