
# -> Remove display
execute as @n[type=block_display,tag=OverlyRealistic.Block.Basket,distance=..0.5] run \
    function overly_realistic:general/custom_blocks/basket/basket_break_operate_on_displays

# -> Remove barrier
fill ~ ~ ~ ~ ~ ~ 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:"composter"} ~ ~ ~ 0.3 0.3 0.3 1 40 normal @a
particle block{block_state:"mud_bricks"} ~ ~ ~ 0.3 0.1 0.3 1 10 normal @a

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

# -> Remove marker
kill @s
