
# -> If block is not in air then return and break
execute unless block ~ ~ ~ #air run \
    return run \
        function overly_realistic:general/custom_blocks/dry_tinder/dry_tinder_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/dry_tinder/dry_tinder_break

# -> Sound
playsound block.leaf_litter.place block @a ~ ~ ~ 0.65 1
playsound block.leaf_litter.place block @a ~ ~ ~ 0.65 1.5
playsound block.leaf_litter.place block @a ~ ~ ~ 0.65 0.5

# -> Place interaction
execute if entity @s[tag=!OverlyRealistic.Block.DryTinder_Type_DryGrassTuft,tag=!OverlyRealistic.Block.DryTinder_Type_GrassTuft] run \
    summon interaction ~ ~-0.5 ~ {response:1b,Tags:["OverlyRealistic.Block.DryTinder","OverlyRealistic.Block.DryTinder_Type_LeafLitter","OverlyRealistic.Block.DryTinder_Status_Empty","OverlyRealistic.Block.IsCustomBlock","OverlyRealistic.Block.IsFullBlock","OverlyRealistic.Block.SpecializedLifeTimeBlock"],width:1.0f,height:0.08f,data:{or_custom_block_id:"dry_tinder",or_is_custom_block:1b,TinderItems:[],interaction_call:"overly_realistic:general/custom_blocks/dry_tinder/dry_tinder_interact",break_call:"overly_realistic:general/custom_blocks/dry_tinder/dry_tinder_broken_by_player"},              Passengers:[{id:"item_display",item: {components: {"minecraft:item_model": "overlyrealistic:blocks/dry_tinder/dry_tinder_leaf_litter"}, count: 1, id: "minecraft:vine"}, 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, 0.45f, 0.0f]}},             {id:"text_display",Tags:["OverlyRealistic.Block.DryTinderText","OverlyRealistic.Block.DryTinderText_Part_1"],alignment: "center", view_range:0.05, billboard:"vertical", background: 0, default_background: 0b, line_width: 200, see_through: 0b, shadow: 0b, text: {extra: [{color: "black", text: "0/10"}], atlas:"items", sprite: "minecraft:item/stick"}, text_opacity: 126b, transformation: {left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [0.576499f, 0.576499f, 0.576499f], translation: [-0.042800684f, 1.13f, 0.015f]}},                   {id:"text_display",Tags:["OverlyRealistic.Block.DryTinderText","OverlyRealistic.Block.DryTinderText_Part_0"],alignment: "center", view_range:0.05, billboard:"vertical", background: 0, default_background: 0b, line_width: 200, see_through: 0b, shadow: 0b, text: {atlas: "minecraft:gui", sprite: "minecraft:advancements/challenge_frame_unobtained"}, text_opacity: -107b, transformation: {left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [4.0651855f, 4.004658f, 12.17603f], translation: [-0.09854997f, 0.6f, 0.0f]}}]}
execute if entity @s[tag=OverlyRealistic.Block.DryTinder_Type_DryGrassTuft] run \
    summon interaction ~ ~-0.5 ~ {response:1b,Tags:["OverlyRealistic.Block.DryTinder","OverlyRealistic.Block.DryTinder_Type_DryGrassTuft","OverlyRealistic.Block.DryTinder_Status_Empty","OverlyRealistic.Block.IsCustomBlock","OverlyRealistic.Block.IsFullBlock","OverlyRealistic.Block.SpecializedLifeTimeBlock"],width:1.0f,height:0.08f,data:{or_custom_block_id:"dry_tinder",or_is_custom_block:1b,TinderItems:[],interaction_call:"overly_realistic:general/custom_blocks/dry_tinder/dry_tinder_interact",break_call:"overly_realistic:general/custom_blocks/dry_tinder/dry_tinder_broken_by_player"},              Passengers:[{id:"item_display",item: {components: {"minecraft:item_model": "overlyrealistic:blocks/dry_tinder/dry_tinder_dry_grass_tuft"}, count: 1, id: "minecraft:vine"}, 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, 0.45f, 0.0f]}},             {id:"text_display",Tags:["OverlyRealistic.Block.DryTinderText","OverlyRealistic.Block.DryTinderText_Part_1"],alignment: "center", view_range:0.05, billboard:"vertical", background: 0, default_background: 0b, line_width: 200, see_through: 0b, shadow: 0b, text: {extra: [{color: "black", text: "0/10"}], atlas:"items", sprite: "minecraft:item/stick"}, text_opacity: 126b, transformation: {left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [0.576499f, 0.576499f, 0.576499f], translation: [-0.042800684f, 1.13f, 0.015f]}},                   {id:"text_display",Tags:["OverlyRealistic.Block.DryTinderText","OverlyRealistic.Block.DryTinderText_Part_0"],alignment: "center", view_range:0.05, billboard:"vertical", background: 0, default_background: 0b, line_width: 200, see_through: 0b, shadow: 0b, text: {atlas: "minecraft:gui", sprite: "minecraft:advancements/challenge_frame_unobtained"}, text_opacity: -107b, transformation: {left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [4.0651855f, 4.004658f, 12.17603f], translation: [-0.09854997f, 0.6f, 0.0f]}}]}
execute if entity @s[tag=OverlyRealistic.Block.DryTinder_Type_GrassTuft] run \
    summon interaction ~ ~-0.5 ~ {response:1b,Tags:["OverlyRealistic.Block.DryTinder","OverlyRealistic.Block.DryTinder_Type_GrassTuft","OverlyRealistic.Block.DryTinder_Status_Empty","OverlyRealistic.Block.IsCustomBlock","OverlyRealistic.Block.IsFullBlock","OverlyRealistic.Block.SpecializedLifeTimeBlock"],width:1.0f,height:0.08f,data:{or_custom_block_id:"dry_tinder",or_is_custom_block:1b,TinderItems:[],interaction_call:"overly_realistic:general/custom_blocks/dry_tinder/dry_tinder_interact",break_call:"overly_realistic:general/custom_blocks/dry_tinder/dry_tinder_broken_by_player"},              Passengers:[{id:"item_display",item: {components: {"minecraft:item_model": "overlyrealistic:blocks/dry_tinder/dry_tinder_grass_tuft"}, count: 1, id: "minecraft:vine"}, 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, 0.45f, 0.0f]}},             {id:"text_display",Tags:["OverlyRealistic.Block.DryTinderText","OverlyRealistic.Block.DryTinderText_Part_1"],alignment: "center", view_range:0.05, billboard:"vertical", background: 0, default_background: 0b, line_width: 200, see_through: 0b, shadow: 0b, text: {extra: [{color: "black", text: "0/10"}], atlas:"items", sprite: "minecraft:item/stick"}, text_opacity: 126b, transformation: {left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [0.576499f, 0.576499f, 0.576499f], translation: [-0.042800684f, 1.13f, 0.015f]}},                   {id:"text_display",Tags:["OverlyRealistic.Block.DryTinderText","OverlyRealistic.Block.DryTinderText_Part_0"],alignment: "center", view_range:0.05, billboard:"vertical", background: 0, default_background: 0b, line_width: 200, see_through: 0b, shadow: 0b, text: {atlas: "minecraft:gui", sprite: "minecraft:advancements/challenge_frame_unobtained"}, text_opacity: -107b, transformation: {left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [4.0651855f, 4.004658f, 12.17603f], translation: [-0.09854997f, 0.6f, 0.0f]}}]}
