# ==================================================
# void vb.volley.main.main()
# ==================================================

execute if score vb.hoop.time tbms.var matches 1.. run function vb/hoop/shooting
execute if score vb.main.blockCamera tbms.var matches 0 unless score vb.volley.powerup tbms.var matches 0 run function vb/powerup/main
execute unless score vb.volley.served tbms.var matches 0 run function vb/volley/match
execute as @a at @s run function vb/main/move
execute as @e[type=zedafox:meow_inanimate,tag=player] at @s run tp @s ~ ~ ~ facing @e[type=zedafox:ball]
execute as @e[type=zedafox:ball] at @s run function vb/volley/ball
execute as @e[tag=trainer] at @s run tp @s ~ ~ ~ facing @e[type=zedafox:ball,c=1]
execute if score vb.volley.rollTime tbms.var matches 1.. run scoreboard players remove vb.volley.rollTime tbms.var 1
