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

# -> Sound
playsound block.stone.break block @a ~ ~ ~ 1 1
playsound block.leaf_litter.break block @a ~ ~ ~ 1 1
playsound block.leaf_litter.break block @a ~ ~ ~ 1 1.5
playsound block.leaf_litter.break block @a ~ ~ ~ 1 0.5

# -> Particles
particle block{block_state:"leaf_litter"} ~ ~-0.3 ~ 0.3 0 0.3 1 30 normal @a
particle block{block_state:"stone_pressure_plate"} ~ ~-0.3 ~ 0.3 0 0.3 1 20 normal @a
particle block{block_state:"vine"} ~ ~-0.3 ~ 0.3 0 0.3 1 20 normal @a

# -> Drop item
execute unless entity @p[tag=OverlyRealistic.Player.BrokeCustomBlock,gamemode=creative] run \
    loot spawn ~ ~ ~ loot overly_realistic:blocks/preparation_plate

# -> Remove interaction
kill @s
