{
    "format_version": "1.10.0",
    "minecraft:attachable": {
      "description": {
        "identifier": "customshield:test_shield",
        "materials": {
          "default": "entity_alphatest",
          "enchanted": "entity_alphatest_glint"
        },
        "textures": {
          "default": "textures/entity/test_shield",  //模型表面的贴图
          "enchanted": "textures/misc/enchanted_item_glint"
        },
        "geometry": {
          "default": "geometry.test_shield"  //模型
        },
        "animations": {
          //我们提供了一个通用的animation controller，他位于vanilla_netease/animation_controllers/shield.animation_controllers.json
          "wield": "controller.animation.default_custom_shield.wield",   
          //普通的拿盾状态使用了自定义动作
          //您也可以复用原版的动作animation.shield.xxx
          "wield_main_hand_first_person": "animation.test_shield.wield_main_hand_first_person",
          "wield_off_hand_first_person": "animation.test_shield.wield_off_hand_first_person",
          "wield_third_person": "animation.test_shield.wield_third_person",
          
          // 如果防御状态的动作复用了原版的动作， 则在举盾状态时盾牌的旋转部分将不会再旋转
          // "wield_main_hand_first_person_block": "animation.shield.wield_main_hand_first_person_blocking",
          // "wield_off_hand_first_person_block": "animation.shield.wield_off_hand_first_person_blocking"

          // 为了使举盾状态时盾牌的旋转部分也能旋转，防御状态的动作使用了了自定义的动作
          "wield_main_hand_first_person_block": "animation.test_shield.wield_main_hand_first_person_blocking",
          "wield_off_hand_first_person_block": "animation.test_shield.wield_off_hand_first_person_blocking"  
        },
        "scripts": {
          "animate": [
            "wield"
          ],
          // 以下数值定义是复用原版1.18版本中盾牌的animations动作数值
          // 如果复用了原版的盾牌动作，则需要有以下定义
          "initialize": [
            "variable.main_hand_first_person_pos_x =  5.3;",
            "variable.main_hand_first_person_pos_y = 26.0;",
            "variable.main_hand_first_person_pos_z = 0.4;",
            "variable.main_hand_first_person_rot_x = 91.0;",
            "variable.main_hand_first_person_rot_y = 65.0;",
            "variable.main_hand_first_person_rot_z = -43.0;",
            "variable.off_hand_first_person_pos_x = -13.5;",
            "variable.off_hand_first_person_pos_y = -5.8;",
            "variable.off_hand_first_person_pos_z = 5.1;",
            "variable.off_hand_first_person_with_bow_pos_z = -25.0;",
            "variable.off_hand_first_person_rot_x = 1.0;",
            "variable.off_hand_first_person_rot_y = 176.0;",
            "variable.off_hand_first_person_rot_z = -2.5;"
          ],
          // 使用弓时的动作修正
          "pre_animation": [
            "variable.is_using_bow = (query.get_equipped_item_name == 'bow') && (query.main_hand_item_use_duration > 0.0f);"
          ]
        },
        "render_controllers": [ "controller.render.item_default" ]
      }
    }
}