execute if items entity @s weapon.mainhand #shovels if block ~ ~ ~ #mineable/shovel run return run function huge_mushroom:block_breaking/mainhand
execute if items entity @s weapon.mainhand wooden_pickaxe if block ~ ~ ~ #mineable/pickaxe unless block ~ ~ ~ #incorrect_for_wooden_tool run return run function huge_mushroom:block_breaking/mainhand
execute if items entity @s weapon.mainhand stone_pickaxe if block ~ ~ ~ #mineable/pickaxe unless block ~ ~ ~ #incorrect_for_stone_tool run return run function huge_mushroom:block_breaking/mainhand
execute if items entity @s weapon.mainhand iron_pickaxe if block ~ ~ ~ #mineable/pickaxe unless block ~ ~ ~ #incorrect_for_iron_tool run return run function huge_mushroom:block_breaking/mainhand
execute if items entity @s weapon.mainhand diamond_pickaxe if block ~ ~ ~ #mineable/pickaxe unless block ~ ~ ~ #incorrect_for_diamond_tool run return run function huge_mushroom:block_breaking/mainhand
execute if items entity @s weapon.mainhand netherite_pickaxe if block ~ ~ ~ #mineable/pickaxe unless block ~ ~ ~ #incorrect_for_netherite_tool run return run function huge_mushroom:block_breaking/mainhand
execute if items entity @s weapon.mainhand golden_pickaxe if block ~ ~ ~ #mineable/pickaxe unless block ~ ~ ~ #incorrect_for_gold_tool run return run function huge_mushroom:block_breaking/mainhand
execute if items entity @s weapon.mainhand copper_pickaxe if block ~ ~ ~ #mineable/pickaxe unless block ~ ~ ~ #incorrect_for_copper_tool run return run function huge_mushroom:block_breaking/mainhand
execute if items entity @s weapon.mainhand #axes if block ~ ~ ~ #mineable/axe run return run function huge_mushroom:block_breaking/mainhand
execute if items entity @s weapon.mainhand #hoes if block ~ ~ ~ #mineable/hoe run return run function huge_mushroom:block_breaking/mainhand

execute if items entity @s weapon.offhand #hoes if block ~ ~ ~ #huge_mushroom:farming if block ~ ~1 ~ #replaceable run return run function huge_mushroom:block_breaking/offhand_farming
execute if items entity @s weapon.offhand #shovels if block ~ ~ ~ #huge_mushroom:pathing if block ~ ~1 ~ #replaceable run return run function huge_mushroom:block_breaking/offhand_pathing
execute if items entity @s weapon.offhand wooden_pickaxe if block ~ ~ ~ #mineable/pickaxe unless block ~ ~ ~ #incorrect_for_wooden_tool run return run function huge_mushroom:block_breaking/offhand
execute if items entity @s weapon.offhand stone_pickaxe if block ~ ~ ~ #mineable/pickaxe unless block ~ ~ ~ #incorrect_for_stone_tool run return run function huge_mushroom:block_breaking/offhand
execute if items entity @s weapon.offhand iron_pickaxe if block ~ ~ ~ #mineable/pickaxe unless block ~ ~ ~ #incorrect_for_iron_tool run return run function huge_mushroom:block_breaking/offhand
execute if items entity @s weapon.offhand diamond_pickaxe if block ~ ~ ~ #mineable/pickaxe unless block ~ ~ ~ #incorrect_for_diamond_tool run return run function huge_mushroom:block_breaking/offhand
execute if items entity @s weapon.offhand netherite_pickaxe if block ~ ~ ~ #mineable/pickaxe unless block ~ ~ ~ #incorrect_for_netherite_tool run return run function huge_mushroom:block_breaking/offhand
execute if items entity @s weapon.offhand golden_pickaxe if block ~ ~ ~ #mineable/pickaxe unless block ~ ~ ~ #incorrect_for_gold_tool run return run function huge_mushroom:block_breaking/offhand
execute if items entity @s weapon.offhand copper_pickaxe if block ~ ~ ~ #mineable/pickaxe unless block ~ ~ ~ #incorrect_for_copper_tool run return run function huge_mushroom:block_breaking/offhand
execute if items entity @s weapon.offhand #axes if block ~ ~ ~ #mineable/axe run return run function huge_mushroom:block_breaking/offhand

execute if score @s huge_mushroom matches -19..19 run return 0
execute unless block ~ ~ ~ #mineable/pickaxe run function huge_mushroom:block_breaking/mainhand