// @buildsys GENERATED MERGED FILE: DO NOT EDIT DIRECTLY! 
{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "mnp_ci:animal_sea_urchin",
      "materials": {
        "default": "entity_alphatest_one_sided"
      },
      "textures": {
        "default": "textures/mnp/ci/entity/animal_sea_urchin"
      },
      "geometry": {
        "default": "geometry.mnp_ci.animal_sea_urchin"
      },
      "scripts": {
        "initialize": [
          "v.prev_time_stamp = q.time_stamp;",
          "v.velocityX = 0;",
          "v.velocityZ = 0;",
          "v.prevPosX = q.position(0);",
          "v.prevPosZ = q.position(2);",
          "v.magn = 0;",
          "v.yaw = 0;",
          "v.pitch = 0;",
          "v.roll = 0;",
          "v.distance_moved_threshold = 0;"
        ],
        "pre_animation": [
          "q.time_stamp > v.prev_time_stamp ? {v.velocityX = q.position(0) - v.prevPosX; v.prevPosX = q.position(0); v.velocityZ = q.position(2) - v.prevPosZ; v.prevPosZ = q.position(2); v.magn = math.sqrt(math.pow(v.velocityX,2) + math.pow(v.velocityZ,2));};",
          "v.magn > 0.0001 ? {v.yaw = math.lerprotate(math.atan2(v.velocityZ, v.velocityX), v.yaw, math.exp(-2 * q.delta_time)); v.roll = math.lerp(-q.yaw_speed * 0.2, v.roll, math.exp(-q.delta_time)); v.distance_moved_threshold = v.distance_moved_threshold + v.magn;};",
          "math.abs(q.vertical_speed) > 0.1 ? {v.pitch = math.lerp(math.atan2(-q.vertical_speed, q.ground_speed - math.abs(q.vertical_speed)), v.pitch, math.exp(-2 * q.delta_time));};",
          "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": [
          {
            "rotate": "!v.is_caught"
          },
          {
            "roll_forward": "!v.is_caught"
          },
          {
            "wiggle": "math.clamp(v.magn * 30, 1, 3) * !v.is_caught"
          }
        ]
      },
      "animations": {
        "rotate": "animation.mnp_ci.sea_urchin.rotate",
        "roll_forward": "animation.mnp_ci.sea_urchin.roll_forward",
        "wiggle": "animation.mnp_ci.sea_urchin.wiggle"
      },
      "render_controllers": [
        "controller.render.default"
      ],
      "spawn_egg": {
        "texture": "mnp_ci:spawn_egg_animal_sea_urchin"
      }
    }
  }
}