
# -> If block is a chest then return and operate
execute if block ~ ~ ~ decorated_pot run \
    return run \
        execute align xyz \
        unless entity @n[type=marker,tag=OverlyRealistic.Block.ContainerIsDecoratedPot,dx=0,dy=0,dz=0] run \
            summon marker ~0.5 ~0.5 ~0.5 {Tags:["OverlyRealistic.Block.ContainerIsDecoratedPot","OverlyRealistic.Block.IsContainer"]}

# -> Add to range
scoreboard players add @s OverlyRealistic.General.LocalRaycastRange 1

# -> Recursive loop
execute unless score @s OverlyRealistic.General.LocalRaycastRange >= @s OverlyRealistic.General.LocalRaycastRangeMax \
    positioned ^ ^ ^0.1 run \
        function overly_realistic:players/vanilla_block_use/decorated_pot/raycast_travel
