// @buildsys GENERATED MERGED FILE: DO NOT EDIT DIRECTLY! 
{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "mnp_ci:animal_whale",
      "materials": {
        "default": "entity_alphatest"
      },
      "textures": {
        "default": "textures/mnp/ci/entity/animal_whale"
      },
      "geometry": {
        "default": "geometry.mnp_ci.animal_whale"
      },
      "scripts": {
        "initialize": [
          "v.prev_time_stamp = q.time_stamp;",
          "v.velocityX = 0;",
          "v.velocityY = 0;",
          "v.velocityZ = 0;",
          "v.prevPosX = q.position(0);",
          "v.prevPosY = q.position(1);",
          "v.prevPosZ = q.position(2);",
          "v.magn = 0;",
          "v.yaw_speed = q.yaw_speed;",
          "v.yaw1 = math.clamp(v.yaw_speed, -70, 70);",
          "v.yawi = math.abs(v.yaw1) < 55 && v.magn > 0.01;",
          "v.yaw2 = q.body_y_rotation;",
          "v.yaw3 = math.clamp(q.yaw_speed, -60, 60) + math.clamp(math.min_angle(q.body_y_rotation - v.yaw2), -50, 50);",
          "v.pitch = 0;",
          "v.breach = 0;",
          "v.mouth0_r_x = 0;",
          "v.smooth_flop = !q.is_in_water && !q.is_levitating;",
          "v.smooth_breach = 0;"
        ],
        "pre_animation": [
          "q.time_stamp > v.prev_time_stamp ? {v.velocityX = q.position(0) - v.prevPosX; v.prevPosX = q.position(0); v.velocityY = q.position(1) - v.prevPosY; v.prevPosY = q.position(1); v.velocityZ = q.position(2) - v.prevPosZ; v.prevPosZ = q.position(2); v.magn = math.sqrt(math.pow(v.velocityX,2) + math.pow(v.velocityY,2) + math.pow(v.velocityZ,2));};",
          "v.yaw_speed = math.lerp(q.yaw_speed, v.yaw_speed, math.exp(-1 * q.delta_time));",
          "v.yaw1 = math.clamp(v.yaw_speed, -70, 70);",
          "v.yawi = math.lerp(math.abs(v.yaw1) < 55 && v.magn > 0.01, v.yawi, math.exp(-2 * q.delta_time));",
          "v.yaw2 = math.lerprotate(q.body_y_rotation, v.yaw2, math.exp(math.lerp(-0.2, -1, v.yawi) * q.delta_time));",
          "v.yaw3 = math.lerp(math.clamp(q.yaw_speed, -60, 60) + math.clamp(math.min_angle(q.body_y_rotation - v.yaw2), -50, 50), v.yaw3, math.exp(-0.7 * q.delta_time));",
          "v.pitch = math.lerprotate(v.magn <= 0.01 || q.is_levitating || v.breach || q.is_breathing ? 10 : math.asin(-v.velocityY/v.magn), v.pitch, math.exp((-0.7 - 2*v.breach) * q.delta_time));",
          "v.smooth_flop = math.lerp(!q.is_in_water && !q.is_levitating, v.smooth_flop, math.exp(-1 * q.delta_time));",
          "v.smooth_breach = math.lerp(v.breach, v.smooth_breach, math.exp(-1 * q.delta_time));",
          "v.zrot = !query.is_in_water ? math.cos((q.time_stamp + q.frame_alpha) * 5) * 90 : 0;",
          "v.prev_time_stamp = q.time_stamp;",
          "v.is_on_lure = q.property('mnp_ci:is_on_lure');",
          "v.is_caught = q.property('mnp_ci:is_caught');"
        ],
        "animate": [
          {
            "flop": "v.smooth_flop && !v.is_caught"
          },
          {
            "swim": "(1-v.smooth_flop) * (1-v.smooth_breach)"
          },
          {
            "blow_hole": "0.2"
          },
          {
            "swim.angle.pitch": "(1-v.smooth_flop) * (1-0.5*v.smooth_breach)"
          },
          {
            "swim.angle.yaw": "1-v.smooth_flop"
          },
          {
            "controller1": "q.is_in_water"
          },
          {
            "controller2": "q.is_in_water"
          },
          {
            "controller3": "q.is_in_water"
          }
        ]
      },
      "animations": {
        "controller1": "controller.animation.mnp_ci.whale1",
        "controller2": "controller.animation.mnp_ci.whale2",
        "controller3": "controller.animation.mnp_ci.whale3",
        "flop": "animation.mnp_ci.whale.flop",
        "swim": "animation.mnp_ci.whale.swim",
        "swim.angle.yaw": "animation.mnp_ci.whale.swim.angle.yaw",
        "swim.angle.pitch": "animation.mnp_ci.whale.swim.angle.pitch",
        "blow_hole": "animation.mnp_ci.whale.blow_hole",
        "feed_start": "animation.mnp_ci.whale.feed_start",
        "feed_end": "animation.mnp_ci.whale.feed_end",
        "feed_end_fast": "animation.mnp_ci.whale.feed_end_fast",
        "breach_flip": "animation.mnp_ci.whale.breach_flip",
        "breach_curve": "animation.mnp_ci.whale.breach_curve"
      },
      "particle_effects": {
        "whale_water_vacuum": "mnp_ci:whale_water_vacuum",
        "whale_water_push_out": "mnp_ci:whale_water_push_out",
        "whale_flip_splash_pre": "mnp_ci:whale_flip_splash_pre",
        "whale_spout": "mnp_ci:whale_spout"
      },
      "sound_effects": {
        "spout_breach": "mob.mnp_ci.whale.spout_breach"
      },
      "render_controllers": [
        "controller.render.default"
      ],
      "spawn_egg": {
        "texture": "mnp_ci:spawn_egg_animal_whale"
      }
    }
  }
}