
# -> Check for collapseable blocks
execute unless score #or.setting.block_gravity OverlyRealistic.Settings.ArbitrarySetting matches 0 \
    unless block ~ ~ ~ #overly_realistic:cant_collapse \
    if block ~ ~-1 ~ #air run \
        function overly_realistic:players/block_placement/block_detection/check_collapseable_block

# -> Check for specialized blocks
execute if block ~ ~ ~ #overly_realistic:placed_blocks_of_interest run \
    function overly_realistic:players/block_placement/block_detection/check_specialized_block

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

# -> 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/block_placement/block_detection/raycast_travel
