function pctf:join_detect/loop
execute if entity @a[tag=dev] run function pctf:fx/dev
function pctf:fx/main
function pctf:logic/main
function pctf:logic/lobby/countdown
function pctf:logic/shop/main
function pctf:logic/items/main
execute as @e[type=marker,tag=check_proj] at @s run function pctf:logic/items/filter
execute as @e[type=marker,tag=effect_marker] at @s run function pctf:logic/items/scrolls/effects

execute as @e[type=snowball,tag=added] at @s run function pctf:logic/items/check_snowball/main
execute as @e[type=area_effect_cloud,tag=snowball_cloud] at @s run function pctf:logic/items/check_snowball/snowballs/cloud_main

# tnt
execute as @e[type=minecraft:armor_stand,tag=tnt] at @s run function pctf:logic/items/tnt/summon
execute as @e[type=minecraft:tnt,tag=tnt.entity] at @s run function pctf:logic/items/tnt/main

execute as @e[type=zombie,tag=!bob] at @s run function pctf:logic/game/apocalypse/random_zombie_loop

execute as @e[type=marker,tag=map_center] at @s run function pctf:logic/game/center

execute if score .game_in_progress lobby matches 1 as @e[type=marker,tag=powerup_location] at @s run function pctf:logic/game/powerup/location_main
execute as @e[type=item_display,tag=powerup] at @s run function pctf:logic/game/powerup/main

execute as @e[type=block_display,tag=flag] at @s run function pctf:logic/game/flag/main

execute at @a[tag=end_game,sort=random,limit=1] at @n[tag=map_center,distance=..250] run function pctf:logic/game/end/fireworks/main

execute as @e[tag=shop] at @s run function pctf:logic/shop/rotate

execute as @e[type=minecraft:wind_charge] at @s unless entity @p[distance=..60] run kill @s

#execute if score .lucky_blocks settings matches 1 as @e[type=item,tag=lucky_block_item,nbt={OnGround:0b}] at @s run particle minecraft:totem_of_undying ~ ~0.3 ~ 0 0 0 0.15 1 normal @a

execute if score .lucky_blocks settings matches 1 run function pctf:logic/items/lucky_block/loop

execute as @e[type=arrow,tag=added] at @s run function pctf:logic/player/arrow/main

execute if score .lava_time temp matches 1.. run function pctf:logic/items/lucky_block/outcomes/global/floor_is_lava/main
execute if score .wind_time temp matches 1.. run function pctf:logic/items/lucky_block/outcomes/global/wind_storm/main

execute as @e[type=arrow,scores={at_num=1..}] at @s run function pctf:fx/arrows/main

execute if entity @a[tag=dev] run function pctf:mode/z_map_maker/check_block