// @buildsys GENERATED MERGED FILE: DO NOT EDIT DIRECTLY! 
{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "mnp_ci:animal_giant_squid",
      "materials": {
        "default": "entity_alphatest",
        "alpha_one_sided": "entity_alphatest_one_sided"
      },
      "textures": {
        "default": "textures/mnp/ci/entity/animal_giant_squid_1",
        "ink": "textures/mnp/ci/entity/animal_giant_squid_2",
        "pale": "textures/mnp/ci/entity/animal_giant_squid_3"
      },
      "geometry": {
        "default": "geometry.mnp_ci.animal_giant_squid"
      },
      "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 = math.random(0,360);",
          "v.pitch = -100;",
          "v.stranded_time = 0;",
          "v.tentacle_angle = 0;",
          "v.body_angle_linear = math.random(0, 360);",
          "v.body_angle = math.sin(math.mod(v.body_angle_linear,1)*90) + math.floor(v.body_angle_linear);"
        ],
        "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));};",
          "q.is_in_water ? {v.yaw = math.lerprotate(math.atan2(v.velocityZ, v.velocityX), v.yaw, math.exp(-2 * q.delta_time));};",
          "v.pitch = math.lerprotate(v.magn < 0.0002 ? 0 : math.asin(-v.velocityY/v.magn), v.pitch, math.exp(-2 * q.delta_time));",
          "v.stranded_time = q.is_in_water ? 0 : math.clamp(v.stranded_time + q.delta_time, 0, 15) ;",
          "v.tentacle_angle = math.abs(math.max(math.sin(180 * (1-v.stranded_time/30) * q.life_time), q.is_in_water - 1));",
          "v.body_angle_linear = v.body_angle_linear + q.delta_time * ((math.mod(q.life_time + 1.2,2)-0.4) < 1) * q.is_in_water;",
          "v.body_angle = math.sin(math.mod(v.body_angle_linear,1)*90) + math.floor(v.body_angle_linear);",
          "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": [
          "swim",
          "swim.angle"
        ]
      },
      "animations": {
        "swim": "animation.mnp_ci.giant_squid.swim",
        "swim.angle": "animation.mnp_ci.giant_squid.swim.angle"
      },
      "render_controllers": [
        "controller.render.mnp_ci.giant_squid"
      ],
      "spawn_egg": {
        "texture": "mnp_ci:spawn_egg_animal_giant_squid"
      }
    }
  }
}