{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "minecraft:blaze",
      "min_engine_version": "1.8.0",
      "materials": {
        "body": "blaze_body",
        "head": "entity_alphatest",
        "face": "entity_alphatest",
        "armor": "charged_creeper"
      },
      "textures": {
        "default": "textures/entity/blaze/blaze",
        "armor": "textures/entity/blaze/blaze_armor",
        "face": "textures/entity/blaze/blaze_face"
      },
      "geometry": {
        "default": "geometry.crl.blaze",
        "armor": "geometry.crl.blaze.armor",
        "face": "geometry.crl.blaze.face"
      },
      "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 * 3) + 1);",
          "variable.tilt_angle = math.clamp(((variable.tilt_angle_normalized * 20) + 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_target",
          "move",
          "idle",
          "vertical_adjustment",

          "flame_control",

          "eye_movement",
          "eyebrow_movement"
        ]
      },
      "animations": {
        "look_at_target": "animation.crl.common.look_at_target",
        "move": "animation.crl.blaze.move",
        "idle": "animation.crl.blaze.idle",
        "vertical_adjustment": "animation.crl.blaze.vertical_adjustment",

        "flame_control":"controller.animation.crl.blaze.flame",

        "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"
      },
      "particle_effects": {
        "charged_flames": "minecraft:mobflame_emitter"
      },
      "render_controllers": [ "controller.render.crl.blaze.face","controller.render.crl.blaze", "controller.render.crl.blaze.armor" ],
      "spawn_egg": {
        "texture": "spawn_egg",
        "texture_index": 21
      }
    }
  }
}