{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "minecraft:enderman",
      "min_engine_version": "1.8.0",
      "materials": {
        "default": "enderman",
        "invisible": "enderman_invisible"
      },
      "textures": {
        "default": "textures/entity/enderman/enderman",
        "face": "textures/entity/enderman/enderman_face"
      },
      "geometry": {
        "default": "geometry.crl.enderman",
        "face": "geometry.crl.enderman.face"
      },
      "scripts": {
        "initialize": [
          "v.body_scale = 1.05;",
          "variable.eye_rot.max_diff = 30;",
          "variable.vertical_adjustment_weight = 3.0;",

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

          "variable.time_not_in_water = 0;",
          "v.previous_health = query.health;",
          "v.last_hurt_time = 1000;"
        ],
        "pre_animation": [
          "variable.tcos0 = (Math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 28.65;",

          "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": [
          "control_look_at_target",
          "control_attack",
          "control_bob",

          {"scary_face": "query.is_angry"},
          {"carrying": "query.is_carrying_block"},

          "vertical_adjustment",
          "idle",
          "body_scale",

          "control_eye_movement",
          "control_eyebrow_movement",

          "move",
          {"move_arms": "!query.is_carrying_block"}
        ]
      },
      "animations": {
        "look_at_target_gliding": "animation.humanoid.look_at_target.gliding",
        "look_at_target_swimming": "animation.humanoid.look_at_target.swimming",
        "attack.rotations": "animation.humanoid.attack.rotations",
        "bob": "animation.humanoid.bob",

        "carrying": "animation.crl.enderman.carrying",
        "scary_face": "animation.crl.enderman.scary_face",


        "control_look_at_target": "controller.animation.humanoid.look_at_target",
        "control_attack": "controller.animation.humanoid.attack",
        "control_bob": "controller.animation.humanoid.bob",

        "move": "animation.crl.two_legs.walk",
        "move_arms": "animation.crl.two_legs.walk_only_arms",
        "look_at_target_default": "animation.crl.two_legs.look_at_target",

        "vertical_adjustment": "animation.crl.two_legs.vertical_adjustment",
        "body_scale": "animation.crl.two_legs.scale",
        "idle": "animation.crl.two_legs.idle",

        "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"
      },
      "render_controllers": [ "controller.render.crl.enderman","controller.render.crl.enderman.face" ],
      "spawn_egg": {
        "texture": "spawn_egg",
        "texture_index": 7
      }
    }
  }
}