
# -> Reset adv trigger
advancement revoke @s only overly_realistic:items/use_unlit_torch

# -> If player is on a timer then return and decrease it
execute unless score @s OverlyRealistic.Player.UseUnlitTorchTimer matches 20.. run \
    return run \
        scoreboard players add @s OverlyRealistic.Player.UseUnlitTorchTimer 1

# -> Reset timer
scoreboard players reset @s OverlyRealistic.Player.UseUnlitTorchTimer

# -> Reset vars
scoreboard players set #or.Raycast.RayRange OverlyRealistic.General.ArbitraryData 0

# -> Shooting star raycast
execute anchored eyes \
    positioned ^ ^ ^ \
    anchored feet run \
        function overly_realistic:players/misc/unlit_torch/torch_raycast_travel
