{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "minecraft:strider",
      "materials": { "default": "strider" },
      "textures": {
        "default_0": "textures/entity/strider/strider",
        "default_0_face": "textures/entity/strider/face",

        "default_1": "textures/entity/strider/strider_1",
        "default_1_face": "textures/entity/strider/strider_1_face",

        "default_2": "textures/entity/strider/strider_2",
        "default_2_face": "textures/entity/strider/strider_2_face",

        "saddle": "textures/entity/strider/saddle",
        "suffocated": "textures/entity/strider/strider_suffocated",
        "suffocated_face": "textures/entity/strider/face_suffocated"
      },
      "geometry": {
        "default": "geometry.crl.strider",
        "saddle": "geometry.crl.strider.saddle",
        "face": "geometry.crl.strider.face"
      },
      "spawn_egg": {
        "texture": "spawn_egg_strider"
      },
      "scripts": {
        "initialize": [
          "v.body_scale = 1.05;",
          "variable.eye_rot.max_diff = 45;",
          "variable.vertical_adjustment_weight = 3.0;",

          "v.distance_moved_weight = 3;",
          "v.modified_move_speed_weight = 1;",

          "variable.time_not_in_water = 0;",
          "v.previous_health = query.health;",
          "v.last_hurt_time = 1000;",

          "variable.random_variant = Math.random_integer(0,1000);"
        ],
        "pre_animation": [
          "variable.animation_speed = Math.min(query.modified_move_speed, 0.25);",
          "variable.speed = 85.9437;",
          "variable.bristle_flow=Math.cos(query.modified_distance_moved * variable.speed + 180) * variable.animation_speed;",
          "variable.bristle_range_mod=1;",
          "variable.bristle_speed_mod=1;",

          "variable.tcos0 = (Math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;",

          "variable.body_rot.x = query.body_x_rotation;",
          "variable.body_rot.y = query.body_y_rotation;",

          "variable.eye_rot.x = (query.target_x_rotation - this);",
          "variable.eye_rot.y = (query.target_y_rotation - this);",
          "variable.eye_rot_clamp.x = math.clamp(variable.eye_rot.x, -variable.eye_rot.max_diff, variable.eye_rot.max_diff);",
          "variable.eye_rot_clamp.y = math.clamp(variable.eye_rot.y, -variable.eye_rot.max_diff, variable.eye_rot.max_diff);",

          "variable.eye_ratio.x = (variable.eye_rot_clamp.x / variable.eye_rot.max_diff);",
          "variable.eye_ratio.y = (variable.eye_rot_clamp.y / variable.eye_rot.max_diff);",

          "variable.time_not_in_water = (query.is_in_water ? 0 : (variable.time_not_in_water + query.delta_time));",
          "variable.time_not_in_water = math.clamp(variable.time_not_in_water, 0, 100);",

          "v.last_hurt_time = (query.health < v.previous_health ? 0 :  Math.clamp(v.last_hurt_time + query.delta_time, 0,1000) );",

          "v.previous_health=query.health;"
        ],
        "animate": [
          "look_at_target",
          "strider_walk",
          "bristle_flow",
          "control_eye_movement",
          "control_eyebrow_movement",
          "move",
          "vertical_adjustment",
          "body_scale",
          "idle"
        ]
      },
      "animations": {
        "bristle_flow": "animation.crl.strider.bristle_flow",

        "look_at_target": "animation.crl.two_legs.look_at_target",
        "strider_walk": "animation.crl.strider.walk",

        "control_eye_movement": "controller.animation.crl.eye_movement",
        "control_eyebrow_movement": "controller.animation.crl.eyebrow_movement",

        "blink": "animation.crl.face.blink",
        "blink_long": "animation.crl.face.blink_long",
        "move_eyes": "animation.crl.face.move_eyes",
        "move_eyebrows": "animation.crl.face.move_eyebrows",
        "scared_eyebrows": "animation.crl.face.scared_eyebrows",
        "sleep_eyes": "animation.crl.face.sleep_eyes",
        "angry_eyebrows": "animation.crl.face.angry_eyebrows",

        "move": "animation.crl.two_legs.walk",
        "vertical_adjustment": "animation.crl.two_legs.vertical_adjustment",
        "body_scale": "animation.crl.two_legs.scale",

        "idle": "animation.crl.common.idle_body"
      },
      "render_controllers": [
        "controller.render.crl.strider",
        "controller.render.crl.strider.face",
        "controller.render.crl.strider.saddle"
      ]
    }
  }
}
