{
	"display": {
		"icon": {
			"id": "minecraft:structure_void"
		},
		"title": {"translate":"Pixel Perfect"},
		"description": {"color":"dark_purple","translate":"Use a Spyglass to stare at a bat from at least 50 blocks away"},
		"announce_to_chat": true,
		"frame": "challenge"
	},
	"parent": "blazeandcave:mining/blind_as_a_bat",
	"rewards": {
		"function": "bacap_rewards:mining/pixel_perfect"
	},		
	"criteria": {
		"pixel_perfect": {
			"trigger": "minecraft:using_item",
			"conditions": {
				"player": [
					{
						"condition": "minecraft:entity_properties",
						"predicate": {
							"minecraft:type_specific/player": {

								"looking_at": {
									"entity_type": "minecraft:bat",
									"distance": {
										"absolute": {
											"min": 50
										}
									}
								}
							}
						},
						"entity": "this"
					}
				],
				"item": {
					"items": [
						"minecraft:spyglass"
					]
				}
			}
		}
	}
}
