{
	"format_version": "1.10.0",
	"minecraft:client_entity": {
		"description": {
			"identifier": "cc_fairytales:pegasus",
			"materials": {
				"default": "entity_alphatest"
			},
			"textures": {
				"blanco": "textures/chillcraft/fairytales/entity/pegasus/variantes/pegaso",
				"negro": "textures/chillcraft/fairytales/entity/pegasus/variantes/pegaso_negro",

				"sin_armadura": "textures/chillcraft/fairytales/entity/pegasus/armadura/pegasus_armor_none",
				"armadura_cuero": "textures/chillcraft/fairytales/entity/pegasus/armadura/pegaso_armor_leather",
				"armadura_hierro": "textures/chillcraft/fairytales/entity/pegasus/armadura/pegaso_armor_iron",
				"armadura_oro": "textures/chillcraft/fairytales/entity/pegasus/armadura/pegaso_armor_gold",
				"armadura_diamante": "textures/chillcraft/fairytales/entity/pegasus/armadura/pegaso_armor_diamond"
			},
			"geometry": {
				"default": "geometry.cc_fairytales.pegasus"
			},
			"sound_effects": {
				"volar": "cc_fairytales.pegasus.fly"

			},
			"animations": {
				"walk": "animation.cc_fairytales.pegasus.walk",
				"eat": "animation.cc_fairytales.pegasus.eat",
				"rear": "animation.cc_fairytales.pegasus.rear",
				"tail": "animation.cc_fairytales.pegasus.tail",
				"look_at_player": "animation.cc_fairytales.pegasus.look_at_player",
				"fly": "animation.cc_fairytales.pegasus.fly",
				"save_wings": "animation.cc_fairytales.pegasus.save_wings",
				"fly_controller": "controller.animation.cc_fairytales.pegasus.fly"
			},
			"scripts": {
				"initialize": [
					"variable.eat_anim = 0;",
					"variable.stand_anim = 0;",
					"variable.leg_stand_factor = 0;",
					"variable.leg_x_rot_anim = 0;"
				],
				"pre_animation": [
					"variable.armor_texture_slot = query.armor_texture_slot(1);",
					"variable.eat_anim = math.clamp(variable.eat_anim + (query.is_grazing ? ((1.0 - variable.eat_anim) * 0.4 + 0.05) : -variable.eat_anim * 0.4 - 0.05) * query.delta_time * 20.0, 0.0, 1.0);",
					"variable.head_x_rot = query.target_x_rotation + (query.modified_move_speed > 0.2 ? (math.cos(query.modified_distance_moved * 11.46) * 11.46 * query.modified_move_speed + query.modified_move_speed * 11.46) : 0.0);",
					"variable.inverse_max_stand_eat = (1.0 - math.max(variable.stand_anim, variable.eat_anim));",
					"variable.leg_stand_factor = math.cos((query.modified_distance_moved * 38.38) + 180.0);",
					"variable.leg_x_rot_anim = variable.leg_stand_factor * 45.8 * query.modified_move_speed;"
				],
				"animate": [
					"fly_controller",
					"walk",
					"look_at_player",
					{
						"rear": "variable.stand_anim > 0.0"
					},
					{
						"eat": "!query.is_standing"
					},
					{
						"tail": "Math.mod(q.life_time, 10) < 0.5"
					}
				]
			},
			"render_controllers": ["controller.render.cc_fairytales.pegasus"],
			"spawn_egg": {
				"base_color": "#ffffff",
				"overlay_color": "#fffa00"
			}
		}
	}
}
