
{
  "format_version": "1.10.0",
  "minecraft:attachable": {
    "description": {
      "identifier": "addon:svds",
      "materials": {
        "default": "slime_outer",
        "gun": "entity_alphatest"
      },
      "textures": {
        "default": "textures/guns/ussr/svds"
      },
      "geometry": {
        "default":  "geometry.svds"
      },
      "scripts": {
        "pre_animation": [
           "v.main_hand = c.item_slot == 'main_hand';",
           "v.svds = c.item_slot == 'main_hand';",
           "v.fire = q.main_hand_item_use_duration > 0.0f;"
        ],
        "animate": [
          {"svds_controller": "c.is_first_person && !q.is_riding"},
          {"svds_fire_controller": "variable.svds"}

        ]
      },
      "animations": {
        "svds_aim": "animation.svds_aim",
        "svds_controller": "controller.animation.svds",
        "svds_fire_controller": "controller.animation.svds_fire",
        "svds_shoot": "animation.svds_shoot",
        "svds_reload": "animation.svds_reload_item"
      },
      "render_controllers": [ 
				{ "controller.render.gun": "!c.is_first_person || c.is_first_person && !q.is_sneaking" },
				{ "controller.render.crossbow": "c.is_first_person && !q.is_riding && q.is_sneaking" } ]
    }
  }
}