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

# -> If player is on a timer then return and decrease it
execute if score @s OverlyRealistic.Player.ShootingStarSightTimer matches 1.. run \
    return run \
        scoreboard players remove @s OverlyRealistic.Player.ShootingStarSightTimer 1

# -> Set timer
scoreboard players set @s OverlyRealistic.Player.ShootingStarSightTimer 30

# -> 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/spyglass/shooting_star_check/shooting_star_raycast_travel
