
# -> If block is not in air then return and break
execute unless block ~ ~ ~ #air run \
    return run \
        function overly_realistic:general/custom_blocks/crafting_table_setup/setup_break

# -> 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/crafting_table_setup/setup_break

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

# -> Place display
summon interaction ~ ~ ~ {response:1b,Tags:["OverlyRealistic.Block.CraftingTableSetup","OverlyRealistic.Block.IsCustomBlock","OverlyRealistic.Block.IsFullBlock"],width:1.0f,height:1.0f,data:{interaction_call:"overly_realistic:general/custom_blocks/crafting_table_setup/setup_interaction",break_call:"overly_realistic:general/custom_blocks/crafting_table_setup/setup_break"},Passengers:[{id:"text_display",Tags:["OverlyRealistic.Block.CraftingTableSetup_Text"],alignment: "center", background: 0, billboard: "vertical", default_background: 0b, line_width: 200, see_through: 0b, shadow: 0b, text: {extra: ["\n", {atlas:"blocks",sprite: "minecraft:block/stripped_oak_log_top"}, " 0/1"], atlas:"blocks", sprite: "minecraft:block/crafting_table_front"}, text_opacity: -72b, transformation: {left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [1.0f, 1.0f, 1.0f], translation: [0.0f, 1.25f, 0.0f]}},{id:"item_display",Tags:["OverlyRealistic.Block.CraftingTableSetup_Part_0"],item: {count: 1, id: "minecraft:oak_pressure_plate",components:{item_model:"overlyrealistic:blocks/crafting_table_setup/crafting_table_setup_part_0_progress_0"}}, transformation: {left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [0.99996865f, 0.99996865f, 0.99996877f], translation: [0.0f, 0.5f, 0.0f]}}]}
