
# -> Drop items
execute on passengers \
    if entity @s[type=item_display] run \
        function overly_realistic:general/custom_blocks/mortar/mortar_drop_items

# -> Sound
playsound block.stone.break block @a ~ ~1 ~ 1 1
playsound block.stone.break block @a ~ ~1 ~ 1 1
playsound block.calcite.break block @a ~ ~1 ~ 0.2 1.5

# -> Particles
particle block{block_state:"cobblestone"} ~ ~ ~ 0.3 0.1 0.3 1 10 normal @a

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

# -> Remove display
execute on vehicle \
    on passengers run \
    kill @s[type=item_display]
execute on vehicle run \
    kill @s

# -> Remove marker
kill @s
