
# -> If block is not in air then return and break
execute unless block ~ ~ ~ #air \
    unless block ~ ~ ~ #campfires \
    unless block ~ ~ ~ #slabs run \
        return run \
            function overly_realistic:general/custom_blocks/heated_bloom/heated_bloom_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/heated_bloom/heated_bloom_break

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

# -> Place display
summon interaction ~ ~ ~ {response:1b,Tags:["OverlyRealistic.Block.HeatedBloom","OverlyRealistic.Block.IsCustomBlock","OverlyRealistic.Block.SpecializedLifeTimeBlock"],width:0.6f,height:0.1f,data:{or_custom_block_id:"heated_bloom",or_is_custom_block:1b,interaction_call:"overly_realistic:general/custom_blocks/heated_bloom/heated_bloom_interaction",break_call:"overly_realistic:general/custom_blocks/heated_bloom/heated_bloom_break"},Passengers:[{id:"item_display",Tags:["OverlyRealistic.Block.HeatedBloom"],item: {count: 1, id: "minecraft:raw_iron", components:{item_model:"overlyrealistic:blocks/heated_bloom_placed"}}, 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.4f,0.0f]}}]}

# -> Edit bloom
#execute align xyz \
    as @n[type=interaction,tag=OverlyRealistic.Block.HeatedBloom_TempBloom,dx=0,dy=0,dz=0] run \
        function overly_realistic:general/custom_blocks/heated_bloom/heated_bloom_edit
