{
	"format_version": "1.20.80",
	"minecraft:entity": {
		"description": {
			"identifier": "v360:tabilo",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false
		},
		"component_groups": {
			"tabilo_baby": {
				"minecraft:is_baby": {},
				"minecraft:scale": {
					"value": 0.5
				},
				"minecraft:ageable": {
					"duration": 1200,
					"grow_up": {
						"event": "minecraft:ageable_grow_up",
						"target": "self"
					},
					"feed_items": [
						"minecraft:rotten_flesh",
						"minecraft:chicken",
						"minecraft:porkchop",
						"minecraft:beef",
						"minecraft:rabbit"
					]
				}
			},
			"tabilo_adult": {
				"minecraft:experience_reward": {
					"on_bred": "math.random(1,7)",
					"on_death": "query.last_hit_by_player?math.random(1,3):0"
				},
				"minecraft:breedable": {
					"require_tame": false,
					"require_full_health": true,
					"causes_pregnancy": true,
					"breeds_with": {
						"mate_type": "v360:tabilo",
						"baby_type": "v360:tabilo",
						"breed_event": {
							"event": "on_pregnant",
							"target": "self"
						}
					},
					"breed_items": [
						"minecraft:rotten_flesh",
						"minecraft:chicken",
						"minecraft:porkchop",
						"minecraft:beef",
						"minecraft:rabbit"
					]
				}
			},
			"tabilo_angry": {
				"minecraft:angry": {
					"duration": 25,
					"broadcast_anger": true,
					"broadcast_range": 20,
					"calm_event": {
						"event": "minecraft:on_calm",
						"target": "self"
					}
				},
				"minecraft:on_target_acquired": {}
			},
			"tabilo_wild": {
				"minecraft:tameable": {
					"probability": 0.33,
					"tame_items": [
						"minecraft:rotten_flesh",
						"minecraft:chicken",
						"minecraft:porkchop",
						"minecraft:beef",
						"minecraft:rabbit"
					],
					"tame_event": {
						"event": "minecraft:on_tame",
						"target": "self"
					}
				},
				"minecraft:behavior.nearest_attackable_target": {
					"reselect_targets": true,
					"must_see": false,
					"entity_types": [
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "player"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "axolotl"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "cow"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "pig"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "chicken"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "rabbit"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "villager"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "drowned"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "piglin"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "donkey"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "goat"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "hoglin"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "horse"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "husk"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "illager"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "llama"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "mule"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "mushroomcow"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "pillager"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "polarbear"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "sniffer"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "witch"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "zombie"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "zombie_pigman"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "zombiehorse"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "zombie_villager"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "muppet"
							},
							"max_dist": 16
						},
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "frostbyte"
							},
							"max_dist": 16
						}
					]
				},
				"minecraft:on_target_acquired": {
					"event": "minecraft:become_angry",
					"target": "self"
				}
			},
			"tabilo_tame": {
				"minecraft:is_tamed": {},
				"minecraft:health": {
					"value": 60
				},
				"minecraft:behavior.follow_owner": {
					"priority": 6,
					"speed_multiplier": 1,
					"start_distance": 10,
					"stop_distance": 2
				},
				"minecraft:attack": {
					"damage": 8
				},
				"minecraft:behavior.breed": {
					"priority": 2,
					"speed_multiplier": 1
				},
				"minecraft:behavior.owner_hurt_by_target": {
					"priority": 1
				},
				"minecraft:behavior.owner_hurt_target": {
					"priority": 2
				},
				"minecraft:behavior.nearest_attackable_target": {
					"priority": 5,
					"must_see": true,
					"entity_types": [
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "skeleton"
							},
							"max_dist": 16
						}
					]
				},
				"minecraft:sittable": {},
				"minecraft:healable": {
					"force_use": false,
					"items": [
						{
							"item": "minecraft:rotten_flesh",
							"heal_amount": 1
						},
						{
							"item": "minecraft:chicken",
							"heal_amount": 1
						},
						{
							"item": "minecraft:porkchop",
							"heal_amount": 1
						},
						{
							"item": "minecraft:beef",
							"heal_amount": 1
						},
						{
							"item": "minecraft:rabbit",
							"heal_amount": 1
						}
					]
				}
			},
			"tabilo_spin": {
				"minecraft:behavior.knockback_roar": {
					"priority": 1,
					"duration": 0.8,
					"attack_time": 0.6,
					"knockback_damage": 5,
					"knockback_vertical_strength": 3,
					"knockback_horizontal_strength": 3,
					"knockback_range": 4,
					"on_roar_end": {
						"event": "remove_spin"
					},
					"cooldown_time": 0.1
				}
			},
			"tabilo_pregnant": {
				"minecraft:spawn_entity": {
					"entities": {
						"min_wait_time": 0,
						"max_wait_time": 0,
						"spawn_sound": "plop",
						"spawn_item": "v360:tabilo_egg",
						"spawn_item_event": {
							"event": "on_egg_spawned",
							"target": "self"
						},
						"single_use": true
					}
				},
				"minecraft:is_pregnant": {}
			}
		},
		"components": {
			"minecraft:leashable": {
				"soft_distance": 4,
				"hard_distance": 6,
				"max_distance": 10
			},
			"minecraft:balloonable": {
				"mass": 0.8
			},
			"minecraft:is_hidden_when_invisible": {},
			"minecraft:nameable": {},
			"minecraft:type_family": {
				"family": [
					"tabilo",
					"mob"
				]
			},
			"minecraft:breathable": {
				"total_supply": 15,
				"suffocate_time": 0
			},
			"minecraft:collision_box": {
				"width": 1.5,
				"height": 2
			},
			"minecraft:health": {
				"value": 30
			},
			"minecraft:hurt_on_condition": {
				"damage_conditions": [
					{
						"filters": {
							"test": "in_lava",
							"subject": "self",
							"operator": "==",
							"value": true
						},
						"cause": "lava",
						"damage_per_tick": 4
					}
				]
			},
			"minecraft:movement": {
				"value": 0.3
			},
			"minecraft:navigation.walk": {
				"can_path_over_water": true,
				"avoid_damage_blocks": true
			},
			"minecraft:movement.basic": {},
			"minecraft:jump.static": {},
			"minecraft:can_climb": {},
			"minecraft:attack": {
				"damage": 8
			},
			"minecraft:despawn": {
				"despawn_from_distance": {}
			},
			"minecraft:behavior.float": {
				"priority": 0
			},
			"minecraft:behavior.mount_pathing": {
				"priority": 1,
				"speed_multiplier": 1.25,
				"target_dist": 0,
				"track_target": true
			},
			"minecraft:behavior.stay_while_sitting": {
				"priority": 3
			},
			"minecraft:behavior.melee_attack": {
				"priority": 5,
				"on_attack": {
					"event": "attack",
					"target": "self"
				},
				"cooldown_time": 1
			},
			"minecraft:behavior.random_stroll": {
				"priority": 8,
				"speed_multiplier": 1
			},
			"minecraft:behavior.look_at_player": {
				"priority": 6,
				"target_distance": 6,
				"probability": 0.02
			},
			"minecraft:behavior.hurt_by_target": {
				"priority": 3
			},
			"minecraft:physics": {},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:conditional_bandwidth_optimization": {}
		},
		"events": {
			"minecraft:entity_spawned": {
				"randomize": [
					{
						"weight": 9,
						"add": {
							"component_groups": [
								"tabilo_adult",
								"tabilo_wild"
							]
						}
					},
					{
						"weight": 1,
						"add": {
							"component_groups": [
								"tabilo_baby",
								"tabilo_wild"
							]
						}
					}
				]
			},
			"minecraft:entity_born": {
				"add": {
					"component_groups": [
						"tabilo_baby",
						"tabilo_tame"
					]
				}
			},
			"minecraft:ageable_grow_up": {
				"remove": {
					"component_groups": [
						"tabilo_baby"
					]
				},
				"add": {
					"component_groups": [
						"tabilo_adult"
					]
				}
			},
			"minecraft:ageable_set_baby": {
				"remove": {
					"component_groups": [
						"tabilo_adult"
					]
				},
				"add": {
					"component_groups": [
						"tabilo_baby"
					]
				}
			},
			"minecraft:on_tame": {
				"remove": {
					"component_groups": [
						"tabilo_wild"
					]
				},
				"add": {
					"component_groups": [
						"tabilo_tame"
					]
				}
			},
			"minecraft:become_angry": {
				"add": {
					"component_groups": [
						"tabilo_angry"
					]
				}
			},
			"minecraft:on_calm": {
				"remove": {
					"component_groups": [
						"tabilo_angry"
					]
				}
			},
			"spin": {
				"add": {
					"component_groups": [
						"tabilo_spin"
					]
				}
			},
			"remove_spin": {
				"remove": {
					"component_groups": [
						"tabilo_spin"
					]
				},
				"queue_command": {
					"target": "other"
				}
			},
			"attack": {
				"randomize": [
					{
						"weight": 60
					},
					{
						"add": {
							"component_groups": [
								"tabilo_spin"
							]
						},
						"weight": 35
					},
					{
						"weight": 5,
						"queue_command": {
							"target": "target",
							"command": [
								"fill ~1~2~1~-1~0~-1 v360:fragile_jade_block [] replace air"
							]
						}
					}
				]
			},
			"tabilo_baby": {
				"add": {
					"component_groups": [
						"tabilo_baby",
						"tabilo_wild"
					]
				}
			},
			"on_pregnant": {
				"add": {
					"component_groups": [
						"tabilo_pregnant"
					]
				}
			},
			"on_egg_spawned": {
				"remove": {
					"component_groups": [
						"tabilo_pregnant"
					]
				}
			}
		}
	}
}