{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "minecraft:breeze",
      "materials": {
        "default": "breeze",
        "breeze_eyes": "breeze_eyes",
        "breeze_wind": "breeze_wind"
      },
      "textures": {
        "default": "textures/entity/breeze/breeze",
        "breeze_wind": "textures/entity/breeze/breeze_wind",
        "breeze_eyes": "textures/entity/breeze/breeze_eyes"
      },
      "geometry": {
        "default": "geometry.crl.breeze",
        "breeze_wind_top": "geometry.crl.breeze_wind_top",
        "breeze_wind_mid": "geometry.crl.breeze_wind_mid",
        "breeze_wind_bottom": "geometry.crl.breeze_wind_bottom"
      },
      "spawn_egg": {
        "texture": "spawn_egg_breeze"
      },
      "scripts": {
        "initialize": [
          "v.last_tilt_angle = 0;",

          "variable.random_variant = Math.random_integer(0,100);",

          "variable.eye_rot.max_diff = 55;",

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

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

          "variable.vertical_adjustment_weight = 7.0;"
        ],
        "pre_animation": [
          "v.ground_speed = query.ground_speed;",
          "v.tilt_angle_normalized = math.ln(math.abs(v.ground_speed) + 1);",
          "variable.tilt_angle = math.clamp(((variable.tilt_angle_normalized * 10) + v.last_tilt_angle)/2, 0, 75);",
          "v.last_tilt_angle = v.tilt_angle;",

          "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_controller",
          "idle_controller",
          "move_controller",
          "ground_particles_controller",
          "shoot_controller",
          "jump_controller",
          "idle_ground_sound_controller",

          "vertical_adjustment",
          "eye_movement",
          "eyebrow_movement"
        ],
        "should_update_effects_offscreen": "1.0"
      },
      "animations": {
        "idle": "animation.crl.breeze.idle",
        "jump": "animation.crl.breeze.jump",
        "shoot": "animation.crl.breeze.shoot",
        "slide": "animation.crl.breeze.slide",
        "idle_ground_particles": "animation.crl.breeze.idle_ground_particles",
        "slide_ground_particles": "animation.crl.breeze.slide_ground_particles",
        "whirl_sound": "animation.crl.breeze.whirl_sound",
        "idle_ground_sound": "animation.crl.breeze.idle_ground_sound",
        "look_at_controller": "controller.animation.crl.breeze.look_at",
        "idle_controller": "controller.animation.crl.breeze.idle",
        "move_controller": "controller.animation.crl.breeze.move",
        "ground_particles_controller": "controller.animation.crl.breeze.ground_particles",
        "shoot_controller": "controller.animation.crl.breeze.shoot",
        "jump_controller": "controller.animation.crl.breeze.jump",
        "idle_ground_sound_controller": "controller.animation.crl.breeze.idle_ground_sound",

        "look_at": "animation.crl.common.look_at_target",
        "vertical_adjustment": "animation.crl.breeze.vertical_adjustment",
        "blink": "animation.crl.face.blink",
        "blink_long": "animation.crl.face.blink_long",
        "eye_movement": "controller.animation.crl.eye_movement",
        "eyebrow_movement": "controller.animation.crl.eyebrow_movement",
        "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"
      },
      "render_controllers": [
        "controller.render.crl.breeze",
        "controller.render.crl.breeze_eyes",
        "controller.render.crl.breeze_wind_top",
        "controller.render.crl.breeze_wind_mid",
        "controller.render.crl.breeze_wind_bottom"
      ],
      "sound_effects": {
        "charge": "mob.breeze.charge",
        "inhale": "mob.breeze.inhale",
        "slide": "mob.breeze.slide",
        "whirl": "mob.breeze.whirl",
        "idle_ground_sound": "mob.breeze.idle_ground"
      },
      "particle_effects": {
        "ground_particles": "minecraft:breeze_ground_particle"
      }
    }
  }
}
