
# -> 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

# -> 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 block
setblock ~ ~ ~ leaf_litter[facing=north,segment_amount=4]

# -> Place display
summon minecraft:block_display ~ ~ ~ {Tags:["OverlyRealistic.Block.DryTinder"],block_state: {Name: "minecraft:vine", Properties: {east: "false", north: "false", south: "false", up: "true", west: "false"}}, transformation: {left_rotation: [1.0f, 0.0f, 0.0f, 0.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [1.0f, 1.0f, 1.0f], translation: [-0.5f, 0.5f, 0.5f]}}

# -> Place interaction
summon interaction ~ ~-0.5 ~ {response:1b,Tags:["OverlyRealistic.Block.DryTinder","OverlyRealistic.Block.DryTinder_Status_Empty","OverlyRealistic.Block.IsCustomBlock"],width:1.001f,height:0.08f,data:{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"}}

# -> Remove marker
kill @s
