{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "minecraft:camel_husk",
      "min_engine_version": "1.12.0",
      "materials": {
        "default": "camel"
      },
      "textures": {
        "default": "textures/entity/camel_husk/camel_husk"
      },
      "geometry": {
        "default": "geometry.camel_husk"
      },
      "spawn_egg": {
        "texture": "spawn_egg_camel_husk"
      },
      "scripts": {
        "pre_animation": [
          "variable.dash_cooldown = (!(variable.last_dash_cooldown ?? true) && query.has_dash_cooldown) ? 2.75 : ( variable.dash_cooldown ?? 0 );",
          "variable.dash_cooldown = math.max(0, variable.dash_cooldown-query.delta_time);",
          "variable.dash_cooldown_progress = (2.75 - variable.dash_cooldown) / 2.75;",
          "variable.last_dash_cooldown = query.has_dash_cooldown;",

          "variable.moving = query.modified_move_speed > 0.05 || query.vertical_speed > 0.05;",
          "variable.xTargetRot = math.clamp(query.target_x_rotation, -30, 30);",
          "variable.xHeadRot = variable.dash_cooldown_progress > 0 ? math.clamp(variable.xTargetRot + (45 * (1 - variable.dash_cooldown_progress)), -25, 70) : variable.xTargetRot;",
          "variable.yHeadRot = math.clamp(query.target_y_rotation, -30, 30);"
        ],
        "animate": ["general_controller", "idle_controller"]
      },
      "animations": {
        "moving": "animation.camel.walk",
        "sit_down": "animation.camel.sit_down",
        "sitting": "animation.camel.sit",
        "stand_up": "animation.camel.stand_up",
        "look_at_target": "animation.camel.look_at_target",
        "dashing": "animation.camel.dash",
        "dashing_sound": "animation.camel.dash_sound",
        "idle": "animation.camel.idle",
        "general_controller": "controller.animation.camel_husk.general",
        "idle_controller": "controller.animation.camel_husk.idle"
      },
      "sound_effects": {
        "sit_down": "mob.camel_husk.sit",
        "stand_up": "mob.camel_husk.stand",
        "dash": "mob.camel_husk.dash"
      },
      "render_controllers": ["controller.render.camel_husk"]
    }
  }
}
