
# -> Debug
#particle flame ~ ~ ~ 0 0 0 0.0001 1 force @a

# -> Check for is_stone blocks
execute if block ~ ~ ~ #overly_realistic:is_stone run \
    return run \
        scoreboard players set #or.is_looking_at_rock OverlyRealistic.General.ArbitraryData 1

# -> Check for non-air block
execute unless block ~ ~ ~ #overly_realistic:spear_can_passthrough run \
    return fail

# -> Increment raycast
scoreboard players add #or.Raycast.RayRange OverlyRealistic.General.ArbitraryData 1

# -> Loop
execute unless score #or.Raycast.RayRange OverlyRealistic.General.ArbitraryData >= #or.Raycast.RayRangeMax OverlyRealistic.General.ArbitraryData \
    positioned ^ ^ ^0.1 run \
        function overly_realistic:players/items/flint_flake/item_raycast_travel
