// @buildsys GENERATED MERGED FILE: DO NOT EDIT DIRECTLY! 
{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "mnp_ci:animal_orca",
      "materials": {
        "default": "entity_alphatest"
      },
      "textures": {
        "default": "textures/mnp/ci/entity/animal_orca"
      },
      "geometry": {
        "default": "geometry.mnp_ci.animal_orca"
      },
      "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 = math.clamp(q.yaw_speed, -55, 55);",
          "v.pitch = 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(math.clamp(q.yaw_speed, -55, 55), v.yaw_speed, math.exp(-2 * q.delta_time));",
          "v.pitch = math.lerprotate(v.magn > 0.001 ? !q.is_levitating * math.asin(-v.velocityY/v.magn) : 0, v.pitch, math.exp(-2 * q.delta_time));",
          "v.zrot = !query.is_in_water ? math.cos((q.time_stamp + q.frame_alpha) * 14.32) * 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": "!q.is_in_water && !q.is_levitating && !v.is_caught"
          },
          {
            "swim": "q.is_in_water || q.is_levitating"
          },
          {
            "swim.angle": "q.is_in_water || q.is_levitating"
          },
          "bite"
        ]
      },
      "animations": {
        "flop": "animation.mnp_ci.orca.flop",
        "swim": "animation.mnp_ci.orca.swim",
        "swim.angle": "animation.mnp_ci.orca.swim.angle",
        "bite": "animation.mnp_ci.orca.bite"
      },
      "render_controllers": [
        "controller.render.default"
      ],
      "spawn_egg": {
        "texture": "mnp_ci:spawn_egg_animal_orca"
      }
    }
  }
}