
# -> If block is not in air then return and break
execute unless block ~ ~ ~ #air run \
    return run \
        function overly_realistic:general/custom_blocks/cooking_board/cooking_board_break_with_data with entity @s data

# -> If block is inside another custom block then return and break
execute align xyz \
    if entity @n[type=interaction,tag=OverlyRealistic.Block.IsCustomBlock,tag=!OverlyRealistic.Block.IsFullBlock,dx=0,dy=0,dz=0] run \
        return run \
            function overly_realistic:general/custom_blocks/cooking_board/cooking_board_break_with_data with entity @s data

# -> Sound
playsound block.wood.place block @a ~ ~ ~ 0.45 1

# -> Place collision
setblock ~ ~ ~ barrier

# -> Store board type data
data modify storage overly_realistic:temp_values temp_string_0 set from entity @s data.type

# -> Place block with data
function overly_realistic:general/custom_blocks/pottery_wheel/pottery_wheel_placed_data with storage overly_realistic:temp_values

# -> Remove marker
kill @s
