{
	"display": {
		"icon": {
			"id": "minecraft:diamond_spear",
			"components": {
				"minecraft:enchantment_glint_override": true
			}
		},
		"title": {"translate":"Master Jouster"},
		"description": {"color":"dark_purple","translate":"Create a spear with all possible enchantments at max level"},
		"announce_to_chat": true,
		"frame": "challenge"
	},
	"parent": "blazeandcave:enchanting/master_knight",
	"rewards": {
		"function": "bacap_rewards:enchanting/master_jouster"
	},		
	"criteria": {
		"perfect_spear": {
			"trigger": "minecraft:inventory_changed",
			"conditions": {
				"items": [
					{
						"items": "#blazeandcave:master_spears",
						"predicates": {
							"enchantments": [
								{
									"enchantments": "minecraft:sharpness",
									"levels": {
										"min": 5
									}
								},
								{
									"enchantments": "minecraft:knockback",
									"levels": {
										"min": 2
									}
								},
								{
									"enchantments": "minecraft:fire_aspect",
									"levels": {
										"min": 2
									}
								},
								{
									"enchantments": "minecraft:looting",
									"levels": {
										"min": 3
									}
								},
								{
									"enchantments": "minecraft:lunge",
									"levels": {
										"min": 3
									}
								},		
								{
									"enchantments": "minecraft:unbreaking",
									"levels": {
										"min": 3
									}
								},	
								{
									"enchantments": "minecraft:mending",
									"levels": {
										"min": 1
									}
								}		
							]
						}
					}
				]
			}
		},
		"perfect_spear_smite": {
			"trigger": "minecraft:inventory_changed",
			"conditions": {
				"items": [
					{
						"items": "#blazeandcave:master_spears",
						"predicates": {
							"enchantments": [
								{
									"enchantments": "minecraft:smite",
									"levels": {
										"min": 5
									}
								},
								{
									"enchantments": "minecraft:knockback",
									"levels": {
										"min": 2
									}
								},
								{
									"enchantments": "minecraft:fire_aspect",
									"levels": {
										"min": 2
									}
								},
								{
									"enchantments": "minecraft:looting",
									"levels": {
										"min": 3
									}
								},
								{
									"enchantments": "minecraft:lunge",
									"levels": {
										"min": 3
									}
								},		
								{
									"enchantments": "minecraft:unbreaking",
									"levels": {
										"min": 3
									}
								},	
								{
									"enchantments": "minecraft:mending",
									"levels": {
										"min": 1
									}
								}		
							]
						}
					}
				]
			}
		},
		"perfect_spear_bane": {
			"trigger": "minecraft:inventory_changed",
			"conditions": {
				"items": [
					{
						"items": "#blazeandcave:master_spears",
						"predicates": {
							"enchantments": [
								{
									"enchantments": "minecraft:bane_of_arthropods",
									"levels": {
										"min": 5
									}
								},
								{
									"enchantments": "minecraft:knockback",
									"levels": {
										"min": 2
									}
								},
								{
									"enchantments": "minecraft:fire_aspect",
									"levels": {
										"min": 2
									}
								},
								{
									"enchantments": "minecraft:looting",
									"levels": {
										"min": 3
									}
								},
								{
									"enchantments": "minecraft:lunge",
									"levels": {
										"min": 3
									}
								},		
								{
									"enchantments": "minecraft:unbreaking",
									"levels": {
										"min": 3
									}
								},	
								{
									"enchantments": "minecraft:mending",
									"levels": {
										"min": 1
									}
								}		
							]
						}
					}
				]
			}
		}
	},
	"requirements": [
		[
			"perfect_spear",
			"perfect_spear_smite",
			"perfect_spear_bane"
		]
	]
}
