{
    "format_version": "1.10.0",
    "minecraft:client_entity": {
        "description": {
            "identifier": "minecraft:horse",
            "min_engine_version": "1.2.6",
            "materials": {
                "default": "horse_leather_armor",
                "UP_box": "entity_emissive_alpha"
            },
            "textures": {
                "UP_box": "models/entity/UP_box",
                "transparent": "models/entity/transparent",
                "base_brown": "textures/entity/horse2/horse_brown",
                "base_white": "textures/entity/horse2/horse_white",
                "base_creamy": "textures/entity/horse2/horse_creamy",
                "base_chestnut": "textures/entity/horse2/horse_chestnut",
                "base_black": "textures/entity/horse2/horse_black",
                "base_gray": "textures/entity/horse2/horse_gray",
                "base_darkbrown": "textures/entity/horse2/horse_darkbrown",
                "markings_none": "textures/entity/horse2/horse_markings_none",
                "markings_white": "textures/entity/horse2/horse_markings_white",
                "markings_whitefield": "textures/entity/horse2/horse_markings_whitefield",
                "markings_whitedots": "textures/entity/horse2/horse_markings_whitedots",
                "markings_blackdots": "textures/entity/horse2/horse_markings_blackdots",
                "armor_none": "textures/entity/horse2/armor/horse_armor_none",
                "armor_leather": "textures/entity/horse2/armor/horse_armor_leather",
                "armor_iron": "textures/entity/horse2/armor/horse_armor_iron",
                "armor_gold": "textures/entity/horse2/armor/horse_armor_gold",
                "armor_diamond": "textures/entity/horse2/armor/horse_armor_diamond"
            },
            "geometry": {
                "default": "geometry.horse.v2",
                "target_rotate": "geometry.target_rotate_16",
                "block": "geometry.block_16"
            },
            "particle_effects": {
                "invisible": "invisible",
                "status_setup": "status_setup",
                "health_setup": "health_setup",
                "hostile_warnings": "hostile_warnings",
                "pos": "pos",
                "locate_line": "locate_line",
                "locate_mob": "locate_horse",
				"pos_egg": "pos_horse"
            },

            "animations": {
                "invisible": "controller.animation.invisible",
                "status": "controller.animation.status",
                "locate": "controller.animation.locate",
				"numbers": "controller.animation.health",
                "target_rotate": "animation.target_rotate",
                "camera_rotate": "animation.camera_rotate",
                "hostile_warnings": "controller.animation.hostile_warnings",
                "pos": "controller.animation.pos",

                "setup": "animation.horse.v2.setup",
                "baby_transform": "animation.horse.v2.baby_transform",
                "walk": "animation.horse.v2.walk",
                "eat": "animation.horse.v2.eat",
                "stand": "animation.horse.v2.stand",
                "tail": "animation.horse.v2.tail"
            },
            "scripts": {
                "initialize": [
                    "variable.eat_anim = 0.0;",
                    "variable.mouth_anim = 0.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.5) : -variable.eat_anim * 0.4 - 0.5) * query.delta_time * 20.0, 0.0, 1.0);",
                    "variable.mouth_anim = math.clamp(variable.mouth_anim + (variable.open_mouth ? ((1.0 - variable.mouth_anim) * 0.7 + 0.5) : -variable.mouth_anim * 0.7 - 0.5) * 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.base_head_angle = variable.inverse_max_stand_eat * (30.0 + variable.head_x_rot + variable.mouth_anim  * math.sin((query.life_time * 20.0 + query.frame_alpha) * 57.3) * 2.86);",
                    "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;",
                    "variable.leg1a_aabb = query.bone_aabb('leg1a');",
                    "variable.y_adjust = query.is_baby ? 0.0 : (variable.leg1a_aabb.max.y - variable.leg1a_aabb.min.y) * (1.0 - (query.model_scale * 16.0));"
                ],
                "animate": [
                    "target_rotate",
                    "camera_rotate",
                    "locate",
					"hostile_warnings",
                    "invisible",
                    "status",
                    "numbers",
                    "pos",

                    "setup", {
                        "baby_transform": "query.is_baby"
                    },
                    "walk",
                    "stand", {
                        "eat": "!query.is_standing"
                    }, {
                        "tail": "variable.shake_tail"
                    }
                ]
            },
            "render_controllers": [
                "controller.render.target_rotate",
                "controller.render.block",
                "controller.render.horse.v1.and.v2"
            ],
            "spawn_egg": {
                "texture": "spawn_egg",
                "texture_index": 23
            }
        }
    }
}
