{
	"display": {
		"icon": {
			"id": "minecraft:splash_potion",
			"components": {
				"minecraft:potion_contents": {
					"potion": "minecraft:fire_resistance"
				}
			}
		},
		"title": {"translate":"Hung, Drawn and Bartered"},
		"description": {"color":"dark_purple","translate":"Barter for every possible type of item with Piglins"},
		"announce_to_chat": true,
		"frame": "challenge"
	},
	"parent": "blazeandcave:nether/when_piglins_fly",
	"rewards": {
		"function": "bacap_rewards:nether/hung_drawn_and_bartered"
	},		
	"criteria": {
		"enchanted_book": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:enchanted_book"
					]
				}
			}
		},
		"iron_boots": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:iron_boots"
					]
				}
			}
		},
		"splash_potion_fire_resistance": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:splash_potion"
					],
					"components": {
						"minecraft:potion_contents": {
							"potion": "minecraft:fire_resistance"
						}
					}
				}
			}
		},
		"potion_fire_resistance": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:potion"
					],
					"components": {
						"minecraft:potion_contents": {
							"potion": "minecraft:fire_resistance"
						}
					}
				}
			}
		},
		"water_bottle": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:potion"
					],
					"components": {
						"minecraft:potion_contents": {
							"potion": "minecraft:water"
						}
					}
				}
			}
		},
		"iron_nugget": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:iron_nugget"
					]
				}
			}
		},
		"ender_pearl": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:ender_pearl"
					]
				}
			}
		},
		"string": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:string"
					]
				}
			}
		},
		"quartz": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:quartz"
					]
				}
			}
		},
		"obsidian": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:obsidian"
					]
				}
			}
		},
		"crying_obsidian": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:crying_obsidian"
					]
				}
			}
		},
		"fire_charge": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:fire_charge"
					]
				}
			}
		},
		"leather": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:leather"
					]
				}
			}
		},
		"soul_sand": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:soul_sand"
					]
				}
			}
		},
		"nether_brick": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:nether_brick"
					]
				}
			}
		},
		"spectral_arrow": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:spectral_arrow"
					]
				}
			}
		},
		"gravel": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:gravel"
					]
				}
			}
		},
		"blackstone": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:blackstone"
					]
				}
			}
		},
		"dried_ghast": {
			"trigger": "minecraft:thrown_item_picked_up_by_player",
			"conditions": {
				"entity": [
					{
						"condition": "minecraft:entity_properties",
						"entity": "this",
						"predicate": {
							"entity_type": "minecraft:piglin"
						}
					}
				],
				"item": {
					"items": [
						"minecraft:dried_ghast"
					]
				}
			}
		}
	}
}
