{
	"format_version": "1.20.80",
	"minecraft:entity": {
		"description": {
			"identifier": "manalabs_zombie:spitter",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false,
			"properties": {
				"manalabs_zombie:digging_out": {
					"type": "bool",
					"client_sync": true,
					"default": true
				},
				"manalabs_zombie:is_natural_spawn": {
					"type": "bool",
					"default": false
				},
				"manalabs_zombie:last_dmg_player": {
					"type": "bool",
					"default": false
				}
			},
			"animations": {
				"ac.death": "controller.animation.manalabs_zombie.spitter.death"
			},
			"scripts": {
				"animate": [
					"ac.death"
				]
			}
		},
		"component_groups": {
			"manalabs_zombie:despawn": {
				"minecraft:instant_despawn": {}
			},
			"manalabs_zombie:digging_out": {
				"minecraft:movement": {
					"value": 0
				},
				"minecraft:pushable": {
					"is_pushable": false,
					"is_pushable_by_piston": false
				},
				"minecraft:collision_box": {
					"height": 0,
					"width": 0
				},
				"minecraft:timer": {
					"time": 2.8,
					"looping": false,
					"time_down_event": {
						"event": "manalabs_zombie:stop_digging_out",
						"target": "self"
					}
				}
			},
			"manalabs_zombie:dug_out": {
				"minecraft:collision_box": {
					"width": 1.3,
					"height": 2.5
				},
				"minecraft:movement": {
					"value": 0.3
				},
				"minecraft:pushable": {
					"is_pushable": false,
					"is_pushable_by_piston": false
				},
				"minecraft:behavior.avoid_mob_type": {
					"priority": 0,
					"entity_types": [
						{
							"filters": [
								{
									"test": "is_family",
									"subject": "other",
									"value": "player"
								}
							],
							"walk_speed_multiplier": 1.35,
							"sprint_speed_multiplier": 1.35,
							"max_dist": 16,
							"must_see": false
						}
					]
				},
				"minecraft:shooter": {
					"def": "manalabs_zombie:acid_projectile"
				},
				"minecraft:behavior.ranged_attack": {
					"priority": 1,
					"charge_charged_trigger": 0,
					"charge_shoot_trigger": 1,
					"burst_shots": 1,
					"attack_radius_min": 8,
					"attack_radius": 20
				}
			},
			"manalabs_zombie:death": {
				"minecraft:movement": {
					"value": 0,
					"max": 0
				},
				"minecraft:collision_box": {
					"height": 0,
					"width": 0
				},
				"minecraft:body_rotation_blocked": {}
			}
		},
		"components": {
			"minecraft:despawn": {
				"despawn_from_distance": {
					"min_distance": 64
				}
			},
			"minecraft:damage_sensor": {
				"triggers": [
					{
						"deals_damage": true,
						"on_damage": {
							"filters": [
								{
									"any_of": [
										{
											"test": "is_family",
											"subject": "other",
											"operator": "==",
											"value": "player"
										},
										{
											"test": "is_family",
											"subject": "damager",
											"operator": "==",
											"value": "manalabs_zombie_fire_charge_projectile"
										}
									]
								}
							],
							"target": "self",
							"event": "manalabs_zombie:last_dmg_player"
						}
					},
					{
						"deals_damage": true,
						"on_damage": {
							"filters": [
								{
									"test": "is_family",
									"subject": "other",
									"operator": "!=",
									"value": "player"
								}
							],
							"target": "self",
							"event": "manalabs_zombie:last_dmg_not_player"
						}
					}
				]
			},
			"minecraft:type_family": {
				"family": ["manalabs_zombie_spitter", "zombie", "undead", "monster", "mob"]
			},
			"minecraft:health": {
				"value": 30,
				"max": 30,
				"min": 1
			},
			"minecraft:hurt_on_condition": {
				"damage_conditions": [
					{
						"filters": {
							"test": "in_lava",
							"subject": "self",
							"operator": "==",
							"value": true
						},
						"cause": "lava",
						"damage_per_tick": 4
					}
				]
			},
			"minecraft:breathable": {
				"total_supply": 15,
				"suffocate_time": 0,
				"breathes_air": true
			},
			"minecraft:burns_in_daylight": {},
			"minecraft:movement.basic": {},
			"minecraft:navigation.walk": {
				"is_amphibious": true,
				"can_pass_doors": true,
				"can_walk": true
			},
			"minecraft:jump.static": {},
			"minecraft:can_climb": {},

			"minecraft:behavior.random_stroll": {
				"priority": 7,
				"speed_multiplier": 0.5
			},
			"minecraft:behavior.look_at_player": {
				"priority": 8,
				"look_distance": 6,
				"probability": 0.02
			},
			"minecraft:behavior.random_look_around": {
				"priority": 9
			},
			"minecraft:behavior.hurt_by_target": {
				"priority": 1,
				"entity_types": [
					{
						"filters": {
							"test": "is_family",
							"subject": "other",
							"operator": "!=",
							"value": "zombie"
						}
					}
				]
			},
			"minecraft:attack": {
				"damage": 4
			},
			"minecraft:follow_range": {
				"value": 32
			},
			"minecraft:behavior.nearest_prioritized_attackable_target": {
				"priority": 0,
				"must_see": true,
				"reselect_targets": true,
				"within_radius": 25.0,
				"must_see_forget_duration": 17.0,
				"entity_types": [
					{
						"filters": {
							"test": "is_family",
							"subject": "other",
							"value": "manalabs_zombie_brain_jar_projectile"
						}
					}
				]
			},
			"minecraft:behavior.nearest_attackable_target": {
				"must_see": true,
				"reselect_targets": true,
				"entity_types": [
					{
						"filters": [
							{
								"all_of": [
									{
										"test": "is_family",
										"subject": "other",
										"value": "player"
									}
								]
							}
						]
					},
					{
						"filters": {
							"any_of": [
								{
									"test": "is_family",
									"subject": "other",
									"value": "villager"
								},
								{
									"test": "is_family",
									"subject": "other",
									"value": "wandering_trader"
								}
							]
						},
						"max_dist": 35,
						"must_see": false
					}
				]
			},
			"minecraft:physics": {},

			"minecraft:conditional_bandwidth_optimization": {},
			"minecraft:is_hidden_when_invisible": {}
		},
		"events": {
			"minecraft:entity_spawned": {
				"trigger": "manalabs_zombie:start_digging_out"
			},
			"manalabs_zombie:death": {
				"add": {
					"component_groups": ["manalabs_zombie:death"]
				}
			},
			"manalabs_zombie:start_digging_out": {
				"add": {
					"component_groups": ["manalabs_zombie:digging_out"]
				},
				"remove": {
					"component_groups": ["manalabs_zombie:dug_out"]
				},
				"set_property": {
					"manalabs_zombie:digging_out": true
				}
			},
			"manalabs_zombie:stop_digging_out": {
				"add": {
					"component_groups": ["manalabs_zombie:dug_out"]
				},
				"remove": {
					"component_groups": ["manalabs_zombie:digging_out"]
				},
				"set_property": {
					"manalabs_zombie:digging_out": false
				}
			},
			"manalabs_zombie:despawn": {
				"add": {
					"component_groups": ["manalabs_zombie:despawn"]
				}
			},
			"manalabs_zombie:natural_spawn": {
				"set_property": {
					"manalabs_zombie:is_natural_spawn": true
				},
				"trigger": "minecraft:entity_spawned"
			},
			"manalabs_zombie:last_dmg_player": {
				"set_property": {
					"manalabs_zombie:last_dmg_player": true
				}
			},
			"manalabs_zombie:last_dmg_not_player": {
				"set_property": {
					"manalabs_zombie:last_dmg_player": false
				}
			}
		}
	}
}
