execute if entity @s[hasitem={item=minecraft:nether_brick}] run replaceitem entity @s slot.weapon.mainhand 0 minecraft:netherbrick 4
execute if entity @s[hasitem={item=minecraft:stone}] run replaceitem entity @s slot.weapon.mainhand 0 minecraft:cobblestone
execute if entity @s[hasitem={item=minecraft:quartz_block}] run replaceitem entity @s slot.weapon.mainhand 0 minecraft:quartz 4
execute if entity @s[hasitem={item=minecraft:brick_block}] run replaceitem entity @s slot.weapon.mainhand 0 minecraft:brick 4
execute if entity @s[hasitem={item=minecraft:deepslate}] run replaceitem entity @s slot.weapon.mainhand 0 minecraft:cobbled_deepslate
execute if entity @s[hasitem={item=minecraft:amethyst_block}] run replaceitem entity @s slot.weapon.mainhand 0 minecraft:amethyst_shard 4
execute positioned as @s run playsound use.stone @a[r=6]