scoreboard players set @s AttackTimer 0
data merge block ~ ~ ~ {auto:0b}
data merge entity @s {NoAI:0,NoGravity:0}
#kill @e[tag=CadeyrnMinion,type=vex]
tag @s remove MidAttack
#reset pot
#execute at @e[name=DayQ,type=armor_stand] run data merge block 999996 120 999969 {auto:1b}

execute as @e[type=zombified_piglin,tag=ChargeStartPig] run data merge entity @s {AngerTime:10000,AngryAt:[I;0,0,0,0]}
execute as @e[type=zombified_piglin,tag=ChargeStartPig] run execute store result entity @s AngryAt[0] int 1 run data get entity @p[tag=CadeyrnFightTag,gamemode=!spectator] UUID[0]
execute as @e[type=zombified_piglin,tag=ChargeStartPig] run execute store result entity @s AngryAt[1] int 1 run data get entity @p[tag=CadeyrnFightTag,gamemode=!spectator] UUID[1]
execute as @e[type=zombified_piglin,tag=ChargeStartPig] run execute store result entity @s AngryAt[2] int 1 run data get entity @p[tag=CadeyrnFightTag,gamemode=!spectator] UUID[2]
execute as @e[type=zombified_piglin,tag=ChargeStartPig] run execute store result entity @s AngryAt[3] int 1 run data get entity @p[tag=CadeyrnFightTag,gamemode=!spectator] UUID[3]

execute at @s run execute if entity @a[distance=..9,tag=CadeyrnFightTag,gamemode=!spectator] run execute as @s run function zzzzdonotuse:cadeyrn/resetaggro
item replace entity @s armor.feet with chainmail_boots{Enchantments:[{id:"minecraft:feather_falling",lvl:20s},{id:"minecraft:blast_protection",lvl:20s},{id:"minecraft:projectile_protection",lvl:6s}]} 1
