{
	"format_version": "1.18.0",
	"minecraft:entity": {
		"description": {
			"identifier": "ldz:ender_target",
			"is_spawnable": false,
			"is_summonable": true,
			"is_experimental": false,
			"animations": {				
				"ctrl.target_reached": "controller.animation.ender_target.reached"
			},
			"scripts": {
				"animate": [
					"ctrl.target_reached"
				]
			},
			"properties": {
				"ldz:target_reached": {
					"type": "enum",
					"client_sync": true,
					"default": "none",
					"values": [
						"none",
						"ender_charger",
						"ender_chef",
						"ender_gardener",
						"ender_hydro"
					]
				}
			}
		},
		"component_groups": {
			"instant_despawn": {
				"minecraft:instant_despawn": {}
			},
			"reached_toggle": {
				"minecraft:is_ignited": {}
			},
			"charger_target": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_charger_target" ]
				},
				"minecraft:entity_sensor": {
					"maximum_count": -1,
					"minimum_count": 1,
					"relative_range": true,
					"require_all": false,
					"sensor_range": 0.5,
					"event_filters": {
						"all_of": [
							{ "test": "is_family", "subject": "other", "value": "ender_charger" }
						]
					},
					"event": "set_target_reached_to_ender_charger"
				}
			},
			"charger_target_1": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_charger_target", "ender_charger_target_1"  ]
				}
			},
			"charger_target_2": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_charger_target", "ender_charger_target_2"  ]
				}
			},
			"charger_target_3": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_charger_target", "ender_charger_target_3"  ]
				}
			},
			"charger_target_4": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_charger_target", "ender_charger_target_4"  ]
				}
			},
			"charger_target_5": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_charger_target", "ender_charger_target_5"  ]
				}
			},
			"chef_target": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_chef_target" ]
				},
				"minecraft:entity_sensor": {
					"maximum_count": -1,
					"minimum_count": 1,
					"relative_range": true,
					"require_all": false,
					"sensor_range": 0.5,
					"event_filters": {
						"all_of": [
							{ "test": "is_family", "subject": "other", "value": "ender_chef" }
						]
					},
					"event": "set_target_reached_to_ender_chef"
				}
			},
			"chef_target_1": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_chef_target", "ender_chef_target_1" ]
				}
			},
			"chef_target_2": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_chef_target", "ender_chef_target_2" ]
				}
			},
			"chef_target_3": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_chef_target", "ender_chef_target_3" ]
				}
			},
			"chef_target_4": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_chef_target", "ender_chef_target_4" ]
				}
			},
			"chef_target_5": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_chef_target", "ender_chef_target_5" ]
				}
			},
			"chef_target_6": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_chef_target", "ender_chef_target_6" ]
				}
			},
			"gardener_target": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_gardener_target" ]
				},
				"minecraft:entity_sensor": {
					"maximum_count": -1,
					"minimum_count": 1,
					"relative_range": true,
					"require_all": false,
					"sensor_range": 0.5,
					"event_filters": {
						"all_of": [
							{ "test": "is_family", "subject": "other", "value": "ender_gardener" }
						]
					},
					"event": "set_target_reached_to_ender_gardener"
				}
			},
			"gardener_target_1": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_gardener_target", "ender_gardener_target_1" ]
				}
			},
			"gardener_target_2": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_gardener_target", "ender_gardener_target_2" ]
				}
			},
			"gardener_target_3": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_gardener_target", "ender_gardener_target_3" ]
				}
			},
			"gardener_target_4": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_gardener_target", "ender_gardener_target_4" ]
				}
			},
			"gardener_target_5": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_gardener_target", "ender_gardener_target_5" ]
				}
			},
			"hydro_target": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_hydro_target" ]
				},
				"minecraft:entity_sensor": {
					"maximum_count": -1,
					"minimum_count": 1,
					"relative_range": true,
					"require_all": false,
					"sensor_range": 0.5,
					"event_filters": {
						"all_of": [
							{ "test": "is_family", "subject": "other", "value": "ender_hydro" }
						]
					},
					"event": "set_target_reached_to_ender_hydro"
				}
			},
			"hydro_target_1": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_hydro_target", "ender_hydro_target_1" ]
				}
			},
			"hydro_target_2": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_hydro_target", "ender_hydro_target_2" ]
				}
			},
			"hydro_target_3": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_hydro_target", "ender_hydro_target_3" ]
				}
			},
			"hydro_target_4": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_hydro_target", "ender_hydro_target_4" ]
				}
			},
			"hydro_target_5": {
				"minecraft:type_family": {
					"family": [ "ldz", "ender_target", "ender_hydro_target", "ender_hydro_target_5" ]
				}
			}
		},
		"components": {
			"minecraft:type_family": {
				"family": [ "ldz", "ender_target" ]
			},
			"minecraft:fire_immune": {},
			"minecraft:knockback_resistance": {
				"value": 100,
				"maximum": 100
			},
			"minecraft:damage_sensor": {
				"triggers": [
					{
						"on_damage": {
							"filters": {
								"test": "has_damage",
								"value": "void"
							},
							"event": "despawn"
						},
						"deals_damage": false
					},
					{
						"cause": "all",
						"deals_damage": false
					}
				]
			},
			"minecraft:physics": {
				"has_collision": false,
				"has_gravity": false
			},
			"minecraft:pushable": {
				"is_pushable": false,
				"is_pushable_by_piston": false
			}
		},
		"events": {
			"charger_target":		{ "add": { "component_groups": [ "charger_target" ] } },
			"charger_target_1":		{ "add": { "component_groups": [ "charger_target", "charger_target_1" ] } },
			"charger_target_2":		{ "add": { "component_groups": [ "charger_target", "charger_target_2" ] } },
			"charger_target_3":		{ "add": { "component_groups": [ "charger_target", "charger_target_3" ] } },
			"charger_target_4":		{ "add": { "component_groups": [ "charger_target", "charger_target_4" ] } },
			"charger_target_5":		{ "add": { "component_groups": [ "charger_target", "charger_target_5" ] } },
			"chef_target":			{ "add": { "component_groups": [ "chef_target" ] } },
			"chef_target_1":		{ "add": { "component_groups": [ "chef_target", "chef_target_1" ] } },
			"chef_target_2":		{ "add": { "component_groups": [ "chef_target", "chef_target_2" ] } },
			"chef_target_3":		{ "add": { "component_groups": [ "chef_target", "chef_target_3" ] } },
			"chef_target_4":		{ "add": { "component_groups": [ "chef_target", "chef_target_4" ] } },
			"chef_target_5":		{ "add": { "component_groups": [ "chef_target", "chef_target_5" ] } },
			"chef_target_6":		{ "add": { "component_groups": [ "chef_target", "chef_target_6" ] } },
			"gardener_target":		{ "add": { "component_groups": [ "gardener_target" ] } },
			"gardener_target_1":	{ "add": { "component_groups": [ "gardener_target", "gardener_target_1" ] } },
			"gardener_target_2":	{ "add": { "component_groups": [ "gardener_target", "gardener_target_2" ] } },
			"gardener_target_3":	{ "add": { "component_groups": [ "gardener_target", "gardener_target_3" ] } },
			"gardener_target_4":	{ "add": { "component_groups": [ "gardener_target", "gardener_target_4" ] } },
			"gardener_target_5":	{ "add": { "component_groups": [ "gardener_target", "gardener_target_5" ] } },
			"hydro_target":			{ "add": { "component_groups": [ "hydro_target" ] } },
			"hydro_target_1":		{ "add": { "component_groups": [ "hydro_target", "hydro_target_1" ] } },
			"hydro_target_2":		{ "add": { "component_groups": [ "hydro_target", "hydro_target_2" ] } },
			"hydro_target_3":		{ "add": { "component_groups": [ "hydro_target", "hydro_target_3" ] } },
			"hydro_target_4":		{ "add": { "component_groups": [ "hydro_target", "hydro_target_4" ] } },
			"hydro_target_5":		{ "add": { "component_groups": [ "hydro_target", "hydro_target_5" ] } },

			"set_target_reached_to_none": {
				"set_property": {
					"ldz:target_reached": "none"
				}
			},
			"set_target_reached_to_ender_charger": {
				"set_property": {
					"ldz:target_reached": "ender_charger"
				}
			},
			"set_target_reached_to_ender_chef": {
				"set_property": {
					"ldz:target_reached": "ender_chef"
				}
			},
			"set_target_reached_to_ender_gardener": {
				"set_property": {
					"ldz:target_reached": "ender_gardener"
				}
			},
			"set_target_reached_to_ender_hydro": {
				"set_property": {
					"ldz:target_reached": "ender_hydro"
				}
			},
			"despawn": {
				"add": {
					"component_groups": [
						"instant_despawn"
					]
				}
			}
		}
	}
}