
{
  "format_version": "1.10.0",
  "minecraft:attachable": {
    "description": {
      "identifier": "addon:cm4_reload",
      "materials": {
        "default": "entity_alphatest"
      },
      "textures": {
        "default": "textures/guns/nato/cm4"
      },
      "geometry": {
        "default":  "geometry.cm4"
      },
      "scripts": {
        "pre_animation": [
           "v.main_hand = c.item_slot == 'main_hand';",
           "v.cm4 = c.item_slot == 'main_hand';"
        ],
        "animate": [
          {"cm4_controller": "c.is_first_person"},
          {"cm4_controller_third": "!c.is_first_person"}
        ]
      },
      "animations": {
        "cm4_controller_third": "controller.animation.cm4_third",
        "cm4_controller": "controller.animation.cm4",
        "cm4_reload": "animation.cm4_reload",
        "cm4_reload_third": "animation.cm4_reload_third"
      },
      "render_controllers": [ "controller.render.crossbow" ]
    }
  }
}