{
	"format_version": "1.21.0",
	"minecraft:entity": {
		"description": {
			"identifier": "manalabs_scp:scp049",
			"name_spawn_egg": "Spawn SCP-049",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false,
			"animations": {
				"spawn_controll": "controller.animation.manalabs_scp.scp049.spawn_controll",
				"spawn_minions": "controller.animation.manalabs_scp.scp049.spawn_minions",
				"killing_mobs": "controller.animation.manalabs_scp.scp049.killing_mobs",
				"check_for_mobs": "animation.manalabs_scp.scp049.check_for_mobs",
				"death_animation": "animation.manalabs_scp.scp049.death_animation"
			},
			"scripts": {
				"animate": [
					{
						"spawn_controll": "query.life_time < 5"
					},
					{
						"spawn_minions": "!query.is_illager_captain"
					},
					{
						"killing_mobs": "query.health > 1"
					},
					{
						"death_animation": "query.health == 1"
					}
				]
			},
			"properties": {
				"manalabs_scp:killing_mob_process": {
					"type": "int",
					"range": [
						1,
						5
					],
					"default": 1,
					"client_sync": true
				},
				"manalabs_scp:spawn_minions": {
					"type": "int",
					"range": [
						0,
						2
					],
					"default": 0,
					"client_sync": true
				}
			}
		},
		"component_groups": {
			"detect_biome": {
				"minecraft:environment_sensor": {
					"triggers": [
						{
							"event": "spawned_on_desert_like",
							"filters": {
								"any_of": [
									{
										"test": "is_biome",
										"value": "desert"
									},
									{
										"test": "is_biome",
										"value": "mesa"
									},
									{
										"test": "is_biome",
										"value": "savanna"
									}
								]
							}
						},
						{
							"event": "spawned_on_other",
							"filters": {
								"none_of": [
									{
										"test": "is_biome",
										"value": "desert"
									},
									{
										"test": "is_biome",
										"value": "mesa"
									},
									{
										"test": "is_biome",
										"value": "savanna"
									}
								]
							}
						}
					]
				}
			},
			"despawn": {
				"minecraft:instant_despawn": {}
			},
			"spawned_minions": {
				"minecraft:environment_sensor": {
					"triggers": [
						{
							"event": "despawn",
							"target": "self",
							"filters": {
								"test": "is_difficulty",
								"operator": "==",
								"value": "peaceful"
							}
						}
					]
				},
				"minecraft:is_illager_captain": {}
			},
			"movement": {
				"minecraft:behavior.nearest_attackable_target": {
					"priority": 2,
					"within_radius": 32,
					"reselect_targets": true,
					"entity_types": [
						{
							"filters": {
								"any_of": [
									{
										"test": "is_family",
										"subject": "other",
										"value": "player"
									},
									{
										"test": "is_family",
										"subject": "other",
										"value": "pillager"
									},
									{
										"test": "is_family",
										"subject": "other",
										"value": "villager"
									}
								]
							},
							"max_dist": 32
						}
					],
					"must_see": false
				},
				"minecraft:behavior.hurt_by_target": {
					"priority": 1
				},
				"minecraft:behavior.float": {
					"priority": 0
				},
				"minecraft:navigation.generic": {
					"can_swim": true,
					"avoid_damage_blocks": true,
					"avoid_water": false,
					"can_path_over_water": true,
					"can_pass_doors": false,
					"can_jump": true,
					"can_walk": true
				},
				"minecraft:movement.basic": {},
				"minecraft:movement": {
					"value": 0.3
				},
				"minecraft:jump.static": {}
			},
			"start_death": {
				"minecraft:type_family": {
					"family": [
						"mob",
						"monster",
						"hostile",
						"manalabs_scp_scp",
						"manalabs_scp_scp049",
						"manalabs_scp_dead"
					]
				},
				"minecraft:damage_sensor": {
					"triggers": {
						"deals_damage": false
					}
				},
				"minecraft:movement": {
					"value": 0.0
				},
				"minecraft:health": {
					"value": 1,
					"max": 1,
					"min": 1
				},
				"minecraft:movement.basic": {
					"max_turn": 0
				},
				"minecraft:pushable": {
					"is_pushable": false,
					"is_pushable_by_piston": false
				},
				"minecraft:knockback_resistance": {
					"value": 1
				},
				"minecraft:attack": {
					"damage": 0
				}
			},
			"death": {
				"minecraft:health": {
					"value": 0,
					"max": 0
				},
				"minecraft:instant_despawn": {}
			},
			"attack_default": {
				"minecraft:variant": {
					"value": 1
				},
				"minecraft:attack": {
					"damage": 8
				},
				"minecraft:behavior.delayed_attack": {
					"priority": 0,
					"cooldown_time": 1.5,
					"reach_multiplier": 2.0,
					"attack_duration": 0.85,
					"hit_delay_pct": 0.5,
					"random_stop_interval": 0,
					"attack_once": false,
					"require_complete_path": false,
					"track_target": false
				},
				"minecraft:follow_range": {
					"value": 32,
					"max": 32
				}
			}
		},
		"components": {
			"minecraft:despawn": {
				"despawn_from_distance": {}
			},
			"minecraft:conditional_bandwidth_optimization": {},
			"minecraft:loot": {
				"table": "loot_tables/manalabs/scp/scp049.loot.json"
			},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:physics": {
				"has_collision": true,
				"has_gravity": true
			},
			"minecraft:collision_box": {
				"height": 2.6,
				"width": 0.9
			},
			"minecraft:knockback_resistance": {
				"value": 0.0,
				"max": 0.0
			},
			"minecraft:push_through": {
				"value": 1
			},
			"minecraft:health": {
				"value": 81,
				"max": 81,
				"min": 1
			},
			"minecraft:attack": {
				"damage": 2
			},
			"minecraft:type_family": {
				"family": [
					"mob",
					"monster",
					"hostile",
					"manalabs_scp_scp",
					"manalabs_scp_scp049"
				]
			}
		},
		"events": {
			"minecraft:entity_spawned": {
				"add": {
					"component_groups": [
						"movement",
						"attack_default",
						"detect_biome"
					]
				}
			},
			"despawn": {
				"add": {
					"component_groups": [
						"despawn"
					]
				}
			},
			"start_death": {
				"remove": {
					"component_groups": [
						"movement",
						"attack_default"
					]
				},
				"add": {
					"component_groups": [
						"start_death"
					]
				}
			},
			"death": {
				"add": {
					"component_groups": [
						"death"
					]
				}
			},
			"attack_default": {
				"add": {
					"component_groups": [
						"attack_default"
					]
				}
			},
			"kill_nearest_mob": {
				"set_property": {
					"manalabs_scp:killing_mob_process": 2
				}
			},
			"reset_kill_nearest_mob": {
				"set_property": {
					"manalabs_scp:killing_mob_process": 1
				}
			},
			"spawned_minions": {
				"remove": {
					"component_groups": [
						"detect_biome"
					]
				},
				"add": {
					"component_groups": [
						"spawned_minions"
					]
				}
			},
			"spawned_on_desert_like": {
				"set_property": {
					"manalabs_scp:spawn_minions": 1
				}
			},
			"spawned_on_other": {
				"set_property": {
					"manalabs_scp:spawn_minions": 2
				}
			}
		}
	}
}