#summon minecraft:item_display ~ ~1.55 ~ {Tags:[ballista],item:{id:crossbow,components:{"minecraft:charged_projectiles":[{id:"minecraft:arrow"}]}}}
execute if entity @e[tag=ballista_stand,distance=...1,tag=!balsetup] run function survivalplus:tools/trap/ballista/failed
execute if block ~ ~-.1 ~ #survivalplus:notrap run function survivalplus:tools/trap/ballista/failed

execute if entity @s[tag=ballista_stand] run summon minecraft:item_display ~ ~1.55 ~ {Tags:[ballista],item:{id:crossbow},CustomName:"Ballista"}
execute positioned ~ ~1.55 ~ run data modify entity @n[tag=ballista] transformation.scale set value [2f,2f,2f]
execute positioned ~ ~1.55 ~ run data modify entity @n[tag=ballista] transformation.right_rotation set value [0f,0f,0.43f,1f]
execute positioned ~ ~1.55 ~ run data modify entity @n[tag=ballista] transformation.left_rotation set value [1f,0f,0f,1f]
#summon minecraft:item_display ~ ~1.7 ~ {Tags:[balarrow]}
#data modify entity @n[tag=balarrow] transformation.scale set value [2f,2f,2f]
#data modify entity @n[tag=balarrow] transformation.right_rotation set value [0f,.965f,0f,1f]
#data modify entity @n[tag=balarrow] transformation.left_rotation set value [.42f,0f,0f,1f]
scoreboard players set @s timer -10
tag @s remove balsetup