
# -> Remove display
execute positioned ~ ~0.5 ~ \
    as @n[type=block_display,tag=OverlyRealistic.Block.WoodenDrum,distance=..0.5] run \
        function overly_realistic:general/custom_blocks/wooden_drum/wooden_drum_remove_displays

# -> Remove barrier
fill ~ ~0.5 ~ ~ ~0.5 ~ air replace barrier

# -> Sound
playsound block.wood.break block @a ~ ~ ~ 1 1
playsound block.wood.break block @a ~ ~ ~ 1 1
playsound entity.zombie.break_wooden_door block @a ~ ~ ~ 0.2 1.5

# -> Particles
particle block{block_state:"barrel"} ~ ~0.65 ~ 0.3 0.3 0.3 1 40 normal @a
particle block{block_state:"white_wool"} ~ ~0.85 ~ 0.3 0.3 0.3 1 10 normal @a

# -> Drop item
execute on attacker \
    unless entity @s[gamemode=creative] run \
        loot spawn ~ ~ ~ loot overly_realistic:blocks/wooden_drum

# -> Remove interaction
kill @s
