{
	"format_version": "1.20.80",
	"minecraft:entity": {
		"description": {
			"identifier": "manalabs_zombie:drone",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false
		},
		"component_groups": {
			"manalabs_zombie:despawn": {
				"minecraft:instant_despawn": {}
			},
			"manalabs_zombie:test_if_explode": {
				"minecraft:environment_sensor": {
					"triggers": [
						{
							"event": "manalabs_zombie:explode",
							"target": "self",
							"filters": {
								"test": "actor_health",
								"subject": "self",
								"value": 1
							}
						},
						{
							"event": "manalabs_zombie:explode",
							"target": "self",
							"filters": {
								"test": "target_distance",
								"operator": "<=",
								"value": 2
							}
						}
					]
				}
			},
			"manalabs_zombie:explode": {
				"minecraft:is_sheared": {},
				"minecraft:explode": {
					"breaks_blocks": true,
					"causes_fire": true,
					"destroy_affected_by_griefing": true,
					"fire_affected_by_griefing": true,
					"fuse_lit": true,
					"fuse_length": [0.8, 0.9],
					"power": 1
				}
			}
		},
		"components": {
			"minecraft:despawn": {
				"despawn_from_distance": {
					"min_distance": 64
				}
			},
			"minecraft:type_family": {
				"family": ["manalabs_zombie_drone", "zombie", "undead", "monster", "mob"]
			},
			"minecraft:health": {
				"value": 7,
				"max": 7,
				"min": 1
			},
			"minecraft:collision_box": {
				"height": 2,
				"width": 0.1
			},
			"minecraft:custom_hit_test": {
				"hitboxes": [
					{
						"width": 1,
						"height": 1,
						"pivot": [0, 1.8, 0]
					}
				]
			},
			"minecraft:breathable": {
				"total_supply": 15,
				"breathes_air": true
			},

			"minecraft:physics": {
				"has_collision": true,
				"has_gravity": true
			},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:movement": {
				"value": 0.25
			},
			"minecraft:movement.generic": {
				"max_turn": 30
			},
			"minecraft:navigation.walk": {
				"avoid_damage_blocks": false,
				"avoid_portals": false,
				"avoid_sun": false,
				"avoid_water": true,
				"blocks_to_avoid": [],
				"can_breach": false,
				"can_break_doors": false,
				"can_jump": true,
				"can_open_doors": false,
				"can_open_iron_doors": false,
				"can_pass_doors": false,
				"can_path_from_air": false,
				"can_path_over_lava": false,
				"can_path_over_water": false,
				"can_sink": true,
				"can_swim": false,
				"can_walk": true,
				"can_walk_in_lava": false,
				"is_amphibious": false
			},
			"minecraft:jump.static": {
				"jump_power": 0.46
			},
			"minecraft:behavior.random_stroll": {
				"priority": 4,
				"interval": 20,
				"speed_multiplier": 0.5
			},

			"minecraft:behavior.avoid_mob_type": {
				"priority": 0,
				"entity_types": [
					{
						"filters": {
							"test": "is_family",
							"subject": "other",
							"value": "manalabs_zombie_doc_zombie"
						}
					}
				],
				"max_dist": 15,
				"max_flee": 10,
				"ignore_visibility": false,
				"remove_target": false
			},
			"minecraft:behavior.nearest_attackable_target": {
				"priority": 2,
				"must_reach": false,
				"must_see": false,
				"must_see_forget_duration": 3,
				"reselect_targets": true,
				"within_radius": 20,
				"entity_types": [
					{
						"filters": {
							"test": "is_family",
							"subject": "other",
							"value": "player"
						}
					}
				]
			},
			"minecraft:shooter": {
				"def": "manalabs_zombie:drone_projectile"
			},
			"minecraft:behavior.ranged_attack": {
				"priority": 1,
				"charge_charged_trigger": 0,
				"charge_shoot_trigger": 1,
				"burst_shots": 1,
				"attack_radius_min": 5,
				"attack_radius": 15
			}
		},
		"events": {
			"minecraft:entity_spawned": {
				"add": {
					"component_groups": ["manalabs_zombie:test_if_explode"]
				}
			},
			"manalabs_zombie:despawn": {
				"add": {
					"component_groups": ["manalabs_zombie:despawn"]
				}
			},
			"manalabs_zombie:explode": {
				"add": {
					"component_groups": ["manalabs_zombie:explode"]
				},
				"remove": {
					"component_groups": ["manalabs_zombie:test_if_explode"]
				}
			}
		}
	}
}
