# Cobble
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe"}},nbt=!{Item:{tag:{Enchantments:[{lvl: 1s, id: "minecraft:silk_touch"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:cobblestone if block ^-1 ^-1 ^-1 minecraft:water if block ^1 ^-1 ^-1 minecraft:lava run loot insert ^ ^ ^-1 loot afonsopack:cobblestone
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe"}},nbt=!{Item:{tag:{Enchantments:[{lvl: 1s, id: "minecraft:silk_touch"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:cobblestone if block ^-1 ^-1 ^-1 minecraft:lava if block ^1 ^-1 ^-1 minecraft:water run loot insert ^ ^ ^-1 loot afonsopack:cobblestone

execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe",tag:{Enchantments: [{lvl: 1s, id: "minecraft:fortune"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:cobblestone if block ^-1 ^-1 ^-1 minecraft:water if block ^1 ^-1 ^-1 minecraft:lava run loot insert ^ ^ ^-1 loot afonsopack:cobblestone_fortune
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe",tag:{Enchantments: [{lvl: 1s, id: "minecraft:fortune"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:cobblestone if block ^-1 ^-1 ^-1 minecraft:lava if block ^1 ^-1 ^-1 minecraft:water run loot insert ^ ^ ^-1 loot afonsopack:cobblestone_fortune

execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe",tag:{Enchantments: [{lvl: 1s, id: "minecraft:efficiency"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:cobblestone if block ^-1 ^-1 ^-1 minecraft:water if block ^1 ^-1 ^-1 minecraft:lava run loot insert ^ ^ ^-1 loot afonsopack:cobblestone_efficiency
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe",tag:{Enchantments: [{lvl: 1s, id: "minecraft:efficiency"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:cobblestone if block ^-1 ^-1 ^-1 minecraft:lava if block ^1 ^-1 ^-1 minecraft:water run loot insert ^ ^ ^-1 loot afonsopack:cobblestone_efficiency

execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe",tag:{Enchantments: [{lvl: 1s, id: "minecraft:fortune"},{lvl: 1s, id: "minecraft:efficiency"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:cobblestone if block ^-1 ^-1 ^-1 minecraft:water if block ^1 ^-1 ^-1 minecraft:lava run loot insert ^ ^ ^-1 loot afonsopack:cobblestone_fortune_efficiency
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe",tag:{Enchantments: [{lvl: 1s, id: "minecraft:fortune"},{lvl: 1s, id: "minecraft:efficiency"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:cobblestone if block ^-1 ^-1 ^-1 minecraft:lava if block ^1 ^-1 ^-1 minecraft:water run loot insert ^ ^ ^-1 loot afonsopack:cobblestone_fortune_efficiency
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe",tag:{Enchantments: [{lvl: 1s, id: "minecraft:efficiency"},{lvl: 1s, id: "minecraft:fortune"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:cobblestone if block ^-1 ^-1 ^-1 minecraft:water if block ^1 ^-1 ^-1 minecraft:lava run loot insert ^ ^ ^-1 loot afonsopack:cobblestone_fortune_efficiency
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe",tag:{Enchantments: [{lvl: 1s, id: "minecraft:efficiency"},{lvl: 1s, id: "minecraft:fortune"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:cobblestone if block ^-1 ^-1 ^-1 minecraft:lava if block ^1 ^-1 ^-1 minecraft:water run loot insert ^ ^ ^-1 loot afonsopack:cobblestone_fortune_efficiency


#Stone
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe",tag:{Enchantments: [{lvl: 1s, id: "minecraft:silk_touch"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:stone if block ^-1 ^-1 ^-1 minecraft:water if block ^1 ^-1 ^-1 minecraft:lava run loot insert ^ ^ ^-1 loot afonsopack:stone
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe",tag:{Enchantments: [{lvl: 1s, id: "minecraft:silk_touch"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:stone if block ^-1 ^-1 ^-1 minecraft:lava if block ^1 ^-1 ^-1 minecraft:water run loot insert ^ ^ ^-1 loot afonsopack:stone

execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe",tag:{Enchantments: [{lvl: 1s, id: "minecraft:efficiency"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:stone if block ^-1 ^-1 ^-1 minecraft:water if block ^1 ^-1 ^-1 minecraft:lava run loot insert ^ ^ ^-1 loot afonsopack:stone_efficiency
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe",tag:{Enchantments: [{lvl: 1s, id: "minecraft:efficiency"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:stone if block ^-1 ^-1 ^-1 minecraft:lava if block ^1 ^-1 ^-1 minecraft:water run loot insert ^ ^ ^-1 loot afonsopack:stone_efficiency

#Obsidian
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe"}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:magma_block if block ^-1 ^-1 ^-1 minecraft:water if block ^1 ^-1 ^-1 minecraft:water run loot insert ^ ^ ^-1 loot afonsopack:obsidian
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe",tag:{Enchantments: [{lvl: 1s, id: "minecraft:efficiency"}]}}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:magma_block if block ^-1 ^-1 ^-1 minecraft:water if block ^1 ^-1 ^-1 minecraft:water run loot insert ^ ^ ^-1 loot afonsopack:obsidian_efficiency

#Sound & Particle | Cobble & Stone
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe"}}] if block ^ ^ ^-1 minecraft:chest if block ^-1 ^-1 ^-1 minecraft:water if block ^1 ^-1 ^-1 minecraft:lava run playsound minecraft:block.stone.break block @a[distance=..5]
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe"}}] if block ^ ^ ^-1 minecraft:chest if block ^-1 ^-1 ^-1 minecraft:lava if block ^1 ^-1 ^-1 minecraft:water run playsound minecraft:block.stone.break block @a[distance=..5]
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe"}}] if block ^ ^ ^-1 minecraft:chest if block ^-1 ^-1 ^-1 minecraft:water if block ^1 ^-1 ^-1 minecraft:lava run particle minecraft:poof ^ ^0.9 ^-0.5 0 0 0 0.1 10 normal @a[distance=..5]
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe"}}] if block ^ ^ ^-1 minecraft:chest if block ^-1 ^-1 ^-1 minecraft:lava if block ^1 ^-1 ^-1 minecraft:water run particle minecraft:poof ^ ^0.9 ^-0.5 0 0 0 0.1 10 normal @a[distance=..5]

#Sound & Particle |  Obsidian
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe"}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:magma_block if block ^-1 ^-1 ^-1 minecraft:water if block ^1 ^-1 ^-1 minecraft:water run playsound minecraft:block.anvil.land block @a[distance=..3] ~ ~ ~ 0.25 0.5 0.25
execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:diamond_pickaxe"}}] if block ^ ^ ^-1 minecraft:chest if block ^ ^-1 ^-1 minecraft:magma_block if block ^-1 ^-1 ^-1 minecraft:water if block ^1 ^-1 ^-1 minecraft:water run particle minecraft:witch ^ ^0.5 ^-0.5 0 0 0 0.1 15 normal @a[distance=..5]

# Loop
schedule function afonsopack:cobblegen/stone 50s