Code:
on projectile hit:
projectile is an snowball:
play sound "expl.bazooka" with volume 100 with pitch 1 at shooter for shooter
create an explosion of force 1
loop blocks in radius 6 around event-location:
add 1 to {explosiondurability::%loop-block%}
if loop-block is oak wooden plank:
{explosiondurability::%loop-block%} is more than or equal to 4
set loop-block to air
if loop-block is cobblestone:
{explosiondurability::%loop-block%} is more than or equal to 5
set loop-block to air
if loop-block is spruce wooden plank:
{explosiondurability::%loop-block%} is more than or equal to 6
set loop-block to air
if loop-block is obsidian:
{explosiondurability::%loop-block%} is more than or equal to 7
set loop-block to air