
# -> Detect acquireable blocks
execute if block ~ ~ ~ #overly_realistic:iron_bucket_can_acquire run \
    return run \
        function overly_realistic:players/items/iron_bucket/empty/get_contents_block

# -> Detect blocks
execute unless block ~ ~ ~ #overly_realistic:spear_can_passthrough run \
    return fail

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

# -> Recursive 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/iron_bucket/empty/raycast_travel
