{
  "format_version": "1.10.0",
  "animation_controllers": {
    "controller.animation.spartan_hand_events": {
      "initial_state": "default",
      "states": {
        "default": {
          "transitions": [
            {
              "charged_mainhand": "v.spartan_shields_charged == 1"
            },
            {
              "charged_offhand":  "v.spartan_shields_charged == 2"
            }
          ]
        },
        "charged_offhand": {
          "transitions": [
            {
              "default": "v.spartan_shields_charged == 0"
            },
            {
              "charged_mainhand": "v.spartan_shields_charged == 1"
            }
          ],
          "on_entry": [
            "@s minecraft:spartan_charged_offhand"
          ],
          "on_exit": [
            "@s minecraft:spartan_no_charged",
            "/tag @s remove player_shield",
            "/execute @s ~~~ tag @e[r=20,tag=!player_shield] remove shield_front"
          ]
        },
        "charged_mainhand": {
          "transitions": [
            {
              "default": "v.spartan_shields_charged == 0"
            },
            {
              "charged_offhand": "v.spartan_shields_charged == 2"
            }
          ],
          "on_entry": [
            "@s minecraft:spartan_charged_mainhand"
          ],
          "on_exit": [
            "@s minecraft:spartan_no_charged",
            "/tag @s remove player_shield",
            "/execute @s ~~~ tag @e[r=20,tag=!player_shield] remove shield_front"
          ]
        }
      }
    }
  }
}