{
	"format_version": "1.16.0",
	"minecraft:entity": {
		"description": {
			"identifier": "eu:tung_tung_tung_sahur",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false
		},
		"component_groups": {
			"minecraft:vindicator_aggro": {
				"minecraft:angry": {
					"duration": -1,
					"broadcast_anger": false,
					"calm_event": {
						"event": "minecraft:stop_aggro",
						"target": "self"
					}
				}
			},
			"minecraft:vindicator_johnny": {
				"minecraft:behavior.nearest_attackable_target": {
					"priority": 2,
					"must_see": true,
					"within_radius": 12,
					"must_see_forget_duration": 40,
					"entity_types": [
						{
							"filters": {
								"all_of": [
									{
										"test": "is_family",
										"subject": "other",
										"operator": "!=",
										"value": "tung_tung_tung_sahur"
									}
								]
							},
							"max_dist": 12
						}
					]
				}
			},
			"minecraft:default_targeting": {
				"minecraft:behavior.nearest_attackable_target": {
					"priority": 2,
					"must_see": true,
					"must_see_forget_duration": 40,
					"entity_types": [
						{
							"filters": {
								"all_of": [
									{
										"test": "is_family",
										"subject": "other",
										"value": "villager"
									},
									{
										"test": "has_component",
										"subject": "other",
										"operator": "!=",
										"value": "minecraft:is_baby"
									}
								]
							},
							"max_dist": 20
						},
						{
							"filters": {
								"all_of": [
									{
										"test": "is_family",
										"subject": "other",
										"value": "italian_brain_rot"
									},
									{
										"test": "is_family",
										"subject": "other",
										"operator": "!=",
										"value": "tung_tung_tung_sahur"
									}
								]
							},
							"max_dist": 20
						}
					]
				}
			}
		},
		"components": {
			"minecraft:experience_reward": {
				"on_death": "query.last_hit_by_player ? (query.is_baby ? 12 : 5) + (Math.die_roll(query.equipment_count,1,3)) : 0"
			},
			"minecraft:conditional_bandwidth_optimization": {},
			"minecraft:nameable": {
				"default_trigger": {
					"event": "minecraft:stop_johnny",
					"target": "self"
				},
				"name_actions": [
					{
						"name_filter": "Johnny",
						"on_named": {
							"event": "minecraft:start_johnny",
							"target": "self"
						}
					}
				]
			},
			"minecraft:type_family": {
				"family": [
					"italian_brain_rot",
					"tung_tung_tung_sahur",
					"monster",
					"mob"
				]
			},
			"minecraft:variant": {
				"value": 0
			},
			"minecraft:breathable": {
				"total_supply": 15,
				"suffocate_time": 0
			},
			"minecraft:collision_box": {
				"width": 0.6,
				"height": 2.2
			},
			"minecraft:health": {
				"value": 40,
				"max": 40
			},
			"minecraft:hurt_on_condition": {
				"damage_conditions": [
					{
						"filters": {
							"test": "in_lava",
							"subject": "self",
							"operator": "==",
							"value": true
						},
						"cause": "lava",
						"damage_per_tick": 4
					}
				]
			},
			"minecraft:attack": {
				"damage": 3
			},
			"minecraft:movement": {
				"value": 0.35
			},
			"minecraft:navigation.walk": {
				"can_path_over_water": true
			},
			"minecraft:movement.basic": {},
			"minecraft:jump.static": {},
			"minecraft:follow_range": {
				"value": 64
			},
			/* 			
			"minecraft:loot": {
				"table": "loot_tables/entities/vindication_illager.json"
			}, */
			/* 			
			"minecraft:equipment": {
				"table": "loot_tables/entities/vindicator_gear.json"
			}, */
			"minecraft:behavior.float": {
				"priority": 0
			},
			"minecraft:behavior.melee_attack": {
				"priority": 3
			},
			"minecraft:behavior.random_stroll": {
				"priority": 9,
				"speed_multiplier": 1
			},
			"minecraft:behavior.look_at_player": {
				"priority": 10,
				"look_distance": 8,
				"probability": 0.02
			},
			"minecraft:behavior.hurt_by_target": {
				"priority": 1
			},
			"minecraft:on_target_acquired": {
				"event": "minecraft:become_aggro",
				"target": "self"
			},
			"minecraft:on_target_escape": {
				"event": "minecraft:stop_aggro",
				"target": "self"
			},
			"minecraft:physics": {},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			}
		},
		"events": {
			"minecraft:entity_spawned": {
				"add": {
					"component_groups": [
						"minecraft:default_targeting"
					]
				}
			},
			"minecraft:become_aggro": {
				"add": {
					"component_groups": [
						"minecraft:vindicator_aggro"
					]
				}
			},
			"minecraft:stop_aggro": {
				"remove": {
					"component_groups": [
						"minecraft:vindicator_aggro"
					]
				}
			},
			"minecraft:start_johnny": {
				"add": {
					"component_groups": [
						"minecraft:vindicator_johnny"
					]
				}
			},
			"minecraft:stop_johnny": {
				"remove": {
					"component_groups": [
						"minecraft:vindicator_johnny"
					]
				},
				"add": {
					"component_groups": [
						"minecraft:default_targeting"
					]
				}
			}
		}
	}
}