{
	"format_version": "1.16.0",
	"minecraft:entity": {
		"description": {
			"identifier": "cc_fairytales:fairy",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false,
			"animations": {
				"fairy": "controller.animation.cc_fairytales.fairy_day"
			},
			"scripts": {
				"animate": ["fairy"]
			}
		},
		"component_groups": {
			"reseteado": {
				"minecraft:mark_variant": {
					"value": 1
				}
			},
			"fairy_salvaje": {
				"minecraft:type_family": {
					"family": ["fairy", "mob"]
				},
				"minecraft:tameable": {
					"probability": 0.7,
					"tame_items": ["cc_fairytales:magic_dust"],
					"tame_event": {
						"event": "minecraft:on_tame",
						"target": "self"
					}
				},
				"minecraft:behavior.avoid_mob_type": {
					"priority": 6,
					"entity_types": [
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "player"
							},
							"max_dist": 15,
							"walk_speed_multiplier": 0.8,
							"sprint_speed_multiplier": 1.33
						}
					]
				}
			},
			"fairy_tame": {
				"minecraft:type_family": {
					"family": ["fairy", "mob"]
				},
				"minecraft:mark_variant": {
					"value": 1
				},
				"minecraft:is_tamed": {},
				"minecraft:behavior.follow_owner": {
					"priority": 2,
					"speed_multiplier": 1.0,
					"start_distance": 5,
					"stop_distance": 1
				}
			},
			"fairy_agua": {
				"minecraft:variant": {
					"value": 0
				},
				"minecraft:interact": {
					"interactions": [
						{
							"use_item": true,
							"play_sounds": "ambient.tame",
							"interact_text": "action.interact.fairy.water.activate",
							"on_interact": {
								"filters": {
									"all_of": [
										{
											"test": "is_family",
											"subject": "other",
											"value": "player"
										},
										{
											"test": "has_component",
											"subject": "self",
											"value": "minecraft:is_tamed"
										},
										{
											"test": "has_equipment",
											"subject": "other",
											"domain": "hand",
											"value": "cc_fairytales:magic_dust"
										}
									]
								},
								"event": "efecto_respiracion"
							}
						},
						{
							"play_sounds": "death",
							"interact_text": "action.interact.fairy.water.final",
							"on_interact": {
								"filters": {
									"all_of": [
										{
											"test": "is_family",
											"subject": "other",
											"value": "player"
										},
										{
											"test": "has_component",
											"subject": "self",
											"value": "minecraft:is_tamed"
										}
									]
								},
								"event": "lloviendo"
							}
						}
					]
				}
			},
			"fairy_fuego": {
				"minecraft:variant": {
					"value": 1
				},
				"minecraft:interact": {
					"interactions": [
						{
							
							"play_sounds": "ambient.tame",
							"interact_text": "action.interact.fairy.fire.activate",
							"use_item": true,
							"on_interact": {
								"filters": {
									"all_of": [
										{
											"test": "is_family",
											"subject": "other",
											"value": "player"
										},
										{
											"test": "has_component",
											"subject": "self",
											"value": "minecraft:is_tamed"
										},
										{
											"test": "has_equipment",
											"subject": "other",
											"domain": "hand",
											"value": "cc_fairytales:magic_dust"
										}
									]
								},
								"event": "efecto_fuego"
							}
						},
						{
							"play_sounds": "death",
							"interact_text": "action.interact.fairy.fire.final",
							"on_interact": {
								"filters": {
									"all_of": [
										{
											"test": "is_family",
											"subject": "other",
											"value": "player"
										},
										{
											"test": "has_component",
											"subject": "self",
											"value": "minecraft:is_tamed"
										}
									]
								},
								"event": "de_dia"
							}
						}
					]
				}
			},
			"fairy_planta": {
				"minecraft:variant": {
					"value": 2
				},
				"minecraft:interact": {
					"interactions": [
						{
							
							"play_sounds": "ambient.tame",
							"interact_text": "action.interact.fairy.plant.activate",
							"use_item": true,
							"on_interact": {
								"filters": {
									"all_of": [
										{
											"test": "is_family",
											"subject": "other",
											"value": "player"
										},
										{
											"test": "has_component",
											"subject": "self",
											"value": "minecraft:is_tamed"
										},
										{
											"test": "has_equipment",
											"subject": "other",
											"domain": "hand",
											"value": "cc_fairytales:magic_dust"
										}
									]
								},
								"event": "efecto_regeneracion"
							}
						},
						{
							"play_sounds": "death",
							"interact_text": "action.interact.fairy.plant.final",
							"on_interact": {
								"filters": {
									"all_of": [
										{
											"test": "is_family",
											"subject": "other",
											"value": "player"
										},
										{
											"test": "has_component",
											"subject": "self",
											"value": "minecraft:is_tamed"
										}
									]
								},
								"event": "da_xp"
							}
						}
					]
				}
			},
			"fairy_tierra": {
				"minecraft:variant": {
					"value": 3
				},
				"minecraft:interact": {
					"interactions": [
						{
							
							"play_sounds": "ambient.tame",
							"interact_text": "action.interact.fairy.dirt.activate",
							"use_item": true,
							"on_interact": {
								"filters": {
									"all_of": [
										{
											"test": "is_family",
											"subject": "other",
											"value": "player"
										},
										{
											"test": "has_component",
											"subject": "self",
											"value": "minecraft:is_tamed"
										},
										{
											"test": "has_equipment",
											"subject": "other",
											"domain": "hand",
											"value": "cc_fairytales:magic_dust"
										}
									]
								},
								"event": "efecto_fuerza"
							}
						},
						{
							"play_sounds": "death",
							"interact_text": "action.interact.fairy.dirt.final",
							"on_interact": {
								"filters": {
									"all_of": [
										{
											"test": "is_family",
											"subject": "other",
											"value": "player"
										},
										{
											"test": "has_component",
											"subject": "self",
											"value": "minecraft:is_tamed"
										}
									]
								},
								"event": "soleado"
							}
						}
					]
				}
			},
			"fairy_oscuridad": {
				"minecraft:variant": {
					"value": 4
				},
				"minecraft:interact": {
					"interactions": [
						{
							
							"play_sounds": "ambient.tame",
							"interact_text": "action.interact.fairy.dark.activate",
							"use_item": true,
							"on_interact": {
								"filters": {
									"all_of": [
										{
											"test": "is_family",
											"subject": "other",
											"value": "player"
										},
										{
											"test": "has_component",
											"subject": "self",
											"value": "minecraft:is_tamed"
										},
										{
											"test": "has_equipment",
											"subject": "other",
											"domain": "hand",
											"value": "cc_fairytales:magic_dust"
										}
									]
								},
								"event": "efecto_nocturna"
							}
						},
						{
							
							"play_sounds": "death",
							"interact_text": "action.interact.fairy.dark.final",
							"on_interact": {
								"filters": {
									"all_of": [
										{
											"test": "is_family",
											"subject": "other",
											"value": "player"
										},
										{
											"test": "has_component",
											"subject": "self",
											"value": "minecraft:is_tamed"
										}
									]
								},
								"event": "de_noche"
							}
						}
					]
				}
			},
			"fairy_rayo": {
				"minecraft:variant": {
					"value": 5
				},
				"minecraft:interact": {
					"interactions": [
						{
							
							"play_sounds": "ambient.tame",
							"interact_text": "action.interact.fairy.bolt.activate",
							"use_item": true,
							"on_interact": {
								"filters": {
									"all_of": [
										{
											"test": "is_family",
											"subject": "other",
											"value": "player"
										},
										{
											"test": "has_component",
											"subject": "self",
											"value": "minecraft:is_tamed"
										},
										{
											"test": "has_equipment",
											"subject": "other",
											"domain": "hand",
											"value": "cc_fairytales:magic_dust"
										}
									]
								},
								"event": "efecto_velocidad"
							}
						},
						{
							"play_sounds": "death",
							"interact_text": "action.interact.fairy.bolt.final",
							"on_interact": {
								"filters": {
									"all_of": [
										{
											"test": "is_family",
											"subject": "other",
											"value": "player"
										},
										{
											"test": "has_component",
											"subject": "self",
											"value": "minecraft:is_tamed"
										}
									]
								},
								"event": "lluvia_fuerte"
							}
						}
					]
				}
			},
			"lluvia": {
				"minecraft:mark_variant": {
					"value": 2
				},
				"minecraft:timer": {
					"time": 1,
					"looping": true,
					"time_down_event": {
						"event": "muerte",
						"target": "self"
					}
				}
			},
			"sol": {
				"minecraft:mark_variant": {
					"value": 3
				},
				"minecraft:timer": {
					"time": 1,
					"looping": true,
					"time_down_event": {
						"event": "muerte",
						"target": "self"
					}
				}
			},
			"tormenta": {
				"minecraft:mark_variant": {
					"value": 4
				},
				"minecraft:timer": {
					"time": 1,
					"looping": true,
					"time_down_event": {
						"event": "muerte",
						"target": "self"
					}
				}
			},
			"dia": {
				"minecraft:mark_variant": {
					"value": 5
				},
				"minecraft:timer": {
					"time": 1,
					"looping": true,
					"time_down_event": {
						"event": "muerte",
						"target": "self"
					}
				}
			},
			"noche": {
				"minecraft:mark_variant": {
					"value": 6
				},
				"minecraft:timer": {
					"time": 1,
					"looping": true,
					"time_down_event": {
						"event": "muerte",
						"target": "self"
					}
				}
			},
			"dar_xp": {
				"minecraft:mark_variant": {
					"value": 7
				},
				"minecraft:timer": {
					"time": 1,
					"looping": true,
					"time_down_event": {
						"event": "muerte",
						"target": "self"
					}
				}
			},
			"muerto": {
				"minecraft:instant_despawn": {
					"remove_child_entities": true
				}
			},
			"respiracion": {
				"minecraft:mark_variant": {
					"value": 8
				}
			},
			"fuerza": {
				"minecraft:mark_variant": {
					"value": 9
				}
			},
			"velocidad": {
				"minecraft:mark_variant": {
					"value": 10
				}
			},
			"fuego": {
				"minecraft:mark_variant": {
					"value": 11
				}
			},
			"nocturna": {
				"minecraft:mark_variant": {
					"value": 12
				}
			},
			"regeneracion": {
				"minecraft:mark_variant": {
					"value": 13
				}
			}
		},
		"components": {
			"minecraft:ambient_sound_interval": {
				"event_name": "ambient",
				"range": 16,
				"value": 8
			},
			"minecraft:is_hidden_when_invisible": {},
			"minecraft:type_family": {
				"family": ["fairy", "mob"]
			},
			"minecraft:collision_box": {
				"width": 0.55,
				"height": 0.5
			},
			"minecraft:experience_reward": {
				"on_death": "query.last_hit_by_player ? 5"
			},
			"minecraft:mark_variant": {
				"value": 0
			},
			"minecraft:nameable": {},
			"minecraft:health": {
				"value": 10
			},
			"minecraft:movement": {
				"value": 0.3
			},
			"minecraft:flying_speed": {
				"value": 0.3
			},
			"minecraft:navigation.hover": {
				"can_path_over_water": true,
				"can_sink": false,
				"can_pass_doors": false,
				"can_path_from_air": true,
				"avoid_water": true,
				"avoid_damage_blocks": true,
				"avoid_sun": false
			},
			"minecraft:movement.hover": {},
			"minecraft:can_fly": {},
			"minecraft:physics": {
				"has_gravity": false
			},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:conditional_bandwidth_optimization": {},
			"minecraft:behavior.panic": {
				"priority": 1,
				"speed_multiplier": 2
			},
			"minecraft:behavior.float": {
				"priority": 7
			},
			"minecraft:behavior.random_look_around": {
				"priority": 8
			},
			"minecraft:jump.static": {},
			"minecraft:behavior.random_hover": {
				"priority": 9,
				"xz_dist": 8,
				"y_dist": 8,
				"y_offset": -1,
				"interval": 1,
				"hover_height": [1, 4]
			},
			"minecraft:loot": {
				"table": "loot_tables/chillcraft/fairy/entities/fairy.json"
			}
		},
		"events": {
			"minecraft:entity_spawned": {
				"sequence": [
					{
						"add": {
							"component_groups": ["fairy_salvaje"]
						}
					},
					{
						"randomize": [
							{
								"add": {
									"component_groups": ["fairy_agua"]
								},
								"weight": 1
							},
							{
								"add": {
									"component_groups": ["fairy_fuego"]
								},
								"weight": 1
							},
							{
								"add": {
									"component_groups": ["fairy_planta"]
								},
								"weight": 1
							},
							{
								"add": {
									"component_groups": ["fairy_tierra"]
								},
								"weight": 1
							},
							{
								"add": {
									"component_groups": ["fairy_oscuridad"]
								},
								"weight": 1
							},
							{
								"add": {
									"component_groups": ["fairy_rayo"]
								},
								"weight": 1
							}
						]
					}
				]
			},
			"minecraft:on_tame": {
				"remove": {
					"component_groups": ["fairy_salvaje"]
				},
				"add": {
					"component_groups": ["fairy_tame"]
				}
			},
			"lloviendo": {
				"add": {
					"component_groups": ["lluvia"]
				}
			},
			"soleado": {
				"add": {
					"component_groups": ["sol"]
				}
			},
			"lluvia_fuerte": {
				"add": {
					"component_groups": ["tormenta"]
				}
			},
			"de_dia": {
				"add": {
					"component_groups": ["dia"]
				}
			},
			"de_noche": {
				"add": {
					"component_groups": ["noche"]
				}
			},
			"da_xp": {
				"add": {
					"component_groups": ["dar_xp"]
				}
			},
			"muerte": {
				"add": {
					"component_groups": ["muerto"]
				}
			},
			"efecto_respiracion": {
				"add": {
					"component_groups": ["respiracion"]
				}
			},
			"efecto_fuerza": {
				"add": {
					"component_groups": ["fuerza"]
				}
			},
			"efecto_velocidad": {
				"add": {
					"component_groups": ["velocidad"]
				}
			},
			"efecto_fuego": {
				"add": {
					"component_groups": ["fuego"]
				}
			},
			"efecto_nocturna": {
				"add": {
					"component_groups": ["nocturna"]
				}
			},
			"efecto_regeneracion": {
				"add": {
					"component_groups": ["regeneracion"]
				}
			},
			"resetear": {
				"add": {
					"component_groups": ["reseteado"]
				}
			}
		}
	}
}
