{
	"format_version": "1.16.100",
	"minecraft:entity": {
		"description": {
			"identifier": "cc_fairytales:charon",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false
		},
		"component_groups": {
			"pacifico": {
				"minecraft:mark_variant": {
					"value": 1
				},
				"minecraft:behavior.melee_attack": {
					"priority": 4,
					"speed_multiplier": 0.7,
					"track_target": false,
					"attack_once": true,
					"on_attack": {
						"target": "self",
						"event": "iniciar_timer"
					}
				}
			},
			"recibe_perla": {
				"minecraft:interact": {
					"interactions": [
						{
							"spawn_items": {
								"table": "loot_tables/chillcraft/fairy/entities/charon_gift.json"
							},
							"use_item": true,
							"cooldown": 400,
							"interact_text": "action.interact.charon.drop",
							"on_interact": {
								"filters": {
									"all_of": [
										{
											"test": "has_equipment",
											"subject": "other",
											"domain": "hand",
											"value": "cc_fairytales:syren_pearl"
										},
										{
											"test": "is_family",
											"subject": "other",
											"value": "player"
										}
									]
								},
								"event": "consume_perla"
							}
						}
					]
				}
			},
			"contador_tiempo": {
				"minecraft:timer": {
					"time": 10,
					"looping": true,
					"time_down_event": {
						"event": "enojado",
						"target": "self"
					}
				},
				"minecraft:damage_sensor": {
					"triggers": [
						{
							"on_damage": {
								"filters": {
									"test": "is_family",
									"subject": "other",
									"value": "player"
								},
								"event": "enojado"
							},
							"deals_damage": false
						}
					]
				},
				"minecraft:behavior.melee_box_attack": {
					"priority": 4,
					"track_target": true,
					"cooldown_time": 1000
				},
				"minecraft:behavior.move_towards_target": {
					"priority": 2,
					"within_radius": 3
				}
			},
			"salgan_mas": {
				"minecraft:spawn_entity": {
					"entities": [
						{
							"min_wait_time": 0,
							"max_wait_time": 0,
							"spawn_entity": "cc_fairytales:soul",
							"single_use": true,
							"num_to_spawn": 6
						}
					]
				},
				"minecraft:behavior.send_event": {
					"cast_duration": 1,
					"event_choices": [
						{
							"weight": 3,
							"filters": {
								"all_of": [
									{
										"test": "is_family",
										"subject": "other",
										"value": "soul"
									}
								]
							},
							"sequence": [
								{
									"event": "malos"
								}
							]
						}
					]
				}
			},
			"sean_malos": {},
			"c_va": {
				"minecraft:timer": {
					"time": 3,
					"looping": true,
					"time_down_event": {
						"event": "desaparecer",
						"target": "self"
					}
				}
			},
			"despawn": {
				"minecraft:instant_despawn": {
					"remove_child_entities": true
				}
			}
		},
		"components": {
			"minecraft:nameable": {},
			"minecraft:breathable": {
				"total_supply": 15,
				"suffocate_time": 0
			},
			"minecraft:collision_box": {
				"width": 1.1,
				"height": 3.5
			},
			"minecraft:movement": {
				"value": 0.4
			},
			"minecraft:attack": {
				"damage": 0
			},
			"minecraft:damage_sensor": {
				"triggers": [
					{
						"on_damage": {
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "cc_fairytales:soul"
							}
						},
						"deals_damage": false
					}
				]
			},
			"minecraft:navigation.walk": {
				"can_path_over_water": true
			},
			"minecraft:type_family": {
				"family": [
					"charon",
					"mob"
				]
			},
			"minecraft:loot": {
				"table": "loot_tables/chillcraft/fairy/entities/charon.json"
			},
			"minecraft:behavior.nearest_attackable_target": {
				"priority": 1,
				"must_see": true,
				"must_see_forget_duration": 1.0,
				"reselect_targets": true,
				"scan_interval": 10,
				"entity_types": [
					{
						"filters": {
							"test": "is_family",
							"subject": "other",
							"value": "player"
						},
						"max_dist": 30
					}
				]
			},
			"minecraft:knockback_resistance": {
				"value": 1
			},
			"minecraft:fire_immune": {},
			"minecraft:movement.basic": {},
			"minecraft:jump.static": {},
			"minecraft:can_climb": {},
			"minecraft:health": {
				"value": 50
			},
			"minecraft:behavior.float": {
				"priority": 0
			},
			"minecraft:behavior.look_at_player": {
				"priority": 7,
				"look_distance": 6,
				"probability": 0.02
			},
			"minecraft:behavior.random_look_around": {
				"priority": 6
			},
			"minecraft:physics": {},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:follow_range": {
				"value": 48,
				"max": 48
			},
			"minecraft:conditional_bandwidth_optimization": {}
		},
		"events": {
			"minecraft:entity_spawned": {
				"add": {
					"component_groups": [
						"pacifico"
					]
				}
			},
			"iniciar_timer": {
				"remove": {
					"component_groups": [
						"pacifico"
					]
				},
				"add": {
					"component_groups": [
						"contador_tiempo",
						"recibe_perla"
					]
				}
			},
			"enojado": {
				"sequence": [
					{
						"remove": {
							"component_groups": [
								"pacifico"
							]
						}
					},
					{
						"add": {
							"component_groups": [
								"salgan_mas",
								"c_va"
							]
						}
					}
				]
			},
			"desaparecer": {
				"add": {
					"component_groups": [
						"despawn"
					]
				}
			},
			"consume_perla": {
				"sequence": [
					{
						"remove": {
							"component_groups": [
								"pacifico",
								"contador_tiempo"
							]
						}
					},
					{
						"add": {
							"component_groups": [
								"c_va"
							]
						}
					}
				]
			}
		}
	}
}