#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#
#    This function has been created by Skilendarz Group.
#             https://skilendarz.com
#
#      GIVE MAP MAKERS THE CREDIT THEY DESERVE!
#             COPYING IS PROHIBITED!
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

tag @s add this
summon marker ~ ~ ~ {Tags:["snowball_next_tick"]}
execute as @e[tag=snowball_next_tick] at @s run function f:game/snowball/next_tick

execute at @e[tag=snowball_next_tick] positioned ~-1 ~-1 ~-1 run function f:game/snowball/target

execute facing entity @p[tag=snowball_target] feet if block ^ ^ ^1 #f:snowball run function f:game/kill/display_kill
execute as @p[tag=snowball_target] facing entity @s feet if block ^ ^ ^1 #f:snowball run function f:game/kill/kill
tag @a remove snowball_target

kill @e[tag=snowball_next_tick]
tag @s remove this