// priority: 100

//Thermal Extruder


function extruder(adjacentBlock, belowBlock, output){

onEvent('recipes', e => {

    e.custom({
        type: "thermal:rock_gen",
        adjacent: adjacentBlock,
        below: belowBlock,
        result: {item: output}
        })
    })
}


extruder('minecraft:water', 'minecraft:stone', 'caveopolis:stone_pebble')
extruder('minecraft:water', 'minecraft:cobblestone', 'caveopolis:cobblestone_pebble')
extruder('minecraft:water', 'minecraft:granite', 'caveopolis:granite_pebble')
extruder('minecraft:water', 'minecraft:diorite', 'caveopolis:diorite_pebble')
extruder('minecraft:water', 'minecraft:andesite', 'caveopolis:andesite_pebble')
extruder('minecraft:water', 'caveopolis:bright_stone', 'caveopolis:bright_shard')
extruder('minecraft:water', 'caveopolis:mossy_stone', 'caveopolis:moss_ball')
extruder('minecraft:water', 'minecraft:deepslate', 'minecraft:deepslate')
extruder('minecraft:water', 'minecraft:calcite', 'minecraft:bone_meal')

colors.forEach(colors => {
    extruder('minecraft:water', `caveopolis:${colors}_colored_stone`, `caveopolis:${colors}_colored_stone`)
})



//Block Recipe

onEvent('recipes', e => {
e.shaped('thermal:device_rock_gen', ['III','ABA', 'III'], {I:'caveopolis:mixed_stone_ingot', B: '#forge:storage_blocks/bronze', A: Item.of('custommachinery:custom_machine_item', '{machine:"caveopolis:advanced_barrel"}')}).id('thermal:device_rock_gen')

})