//This JSON was modified by LateLag (@LateLagMC) and AgentMindStorm (@agentms_). Please do not use this document without permission.
{
  "format_version": "1.10.0",
  "minecraft:attachable": {
    "description": {
      "identifier": "minecraft:shield",
      "scripts": {
        "initialize": [
          "variable.main_hand_first_person_pos_x =  5.7 - 8.0;",
          "variable.main_hand_first_person_pos_y = 3.3 - 14.5;",
          "variable.main_hand_first_person_pos_z = 6.0 - 10.5;",
          "variable.main_hand_first_person_rot_x = 0.0;",
          "variable.main_hand_first_person_rot_y = 180.0;",
          "variable.main_hand_first_person_rot_z = 5.0;",
          "variable.off_hand_first_person_pos_x = -7.75 + 8.0;",
          "variable.off_hand_first_person_pos_y = 3.0 - 14.5;",
          "variable.off_hand_first_person_pos_z = 6.0 - 10.5;",
          "variable.off_hand_first_person_rot_x = 0.0;",
          "variable.off_hand_first_person_rot_y = 180.0;",
          "variable.off_hand_first_person_rot_z = -5.0;"
        ],
        "pre_animation": [
          "variable.is_blocking_main_hand = query.blocking && !query.is_item_name_any('slot.weapon.offhand', 'minecraft:shield') && query.is_item_name_any('slot.weapon.mainhand', 'minecraft:shield');",
          "variable.is_blocking_off_hand = query.blocking && query.is_item_name_any('slot.weapon.offhand', 'minecraft:shield');",
          "variable.is_in_offhand = c.item_slot == 'off_hand';",
          "variable.is_first_person = c.is_first_person;"
        ],
        "animate": [
          "wield"
        ]
      },
      "render_controllers": [ "controller.render.shield" ]
    }
  }
}
