{
	"rewards": {
		"function": "blazeandcave:advancement/count/give_piglin_gold"
	},
	"criteria": {
		"distract_piglin": {
			"trigger": "minecraft:thrown_item_picked_up_by_entity",
			"conditions": {
				"item": {
					"items": [
						"minecraft:gold_ingot"
					]
				},
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"predicate": {
							"entity_type": "minecraft:piglin"
						},
						"entity": "this"
					}
				]
			}
		},
		"distract_piglin_directly": {
			"trigger": "minecraft:player_interacted_with_entity",
			"conditions": {
				"item": {
					"items": [
						"minecraft:gold_ingot"
					]
				},
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"predicate": {
							"entity_type": "minecraft:piglin"
						},
						"entity": "this"
					}
				]
			}
		}
	},
	"requirements": [
		[
			"distract_piglin",
			"distract_piglin_directly"
		]
	]
}
