// priority: 100

//Everything Combiner

//Color Crystal

onEvent('recipes', e => {
    e.recipes.custommachinery.custom_machine("caveopolis:everything_combiner", 260)
    .requireItem(Item.of('caveopolis:white_colored_stone', 16))
    .requireItem(Item.of('caveopolis:black_colored_stone', 16))
    .requireItem(Item.of('caveopolis:blue_colored_stone', 16))
    .requireItem(Item.of('caveopolis:light_blue_colored_stone', 16))
    .requireItem(Item.of('caveopolis:yellow_colored_stone', 16))
    .requireItem(Item.of('caveopolis:red_colored_stone', 16))
    .requireItem(Item.of('caveopolis:light_gray_colored_stone', 16))
    .requireItem(Item.of('caveopolis:gray_colored_stone', 16))
    .requireItem(Item.of('caveopolis:pink_colored_stone', 16))
    .requireItem(Item.of('caveopolis:magenta_colored_stone', 16))
    .requireItem(Item.of('caveopolis:purple_colored_stone', 16))
    .requireItem(Item.of('caveopolis:brown_colored_stone', 16))
    .requireItem(Item.of('caveopolis:lime_colored_stone', 16))
    .requireItem(Item.of('caveopolis:green_colored_stone', 16))
    .requireItem(Item.of('caveopolis:cyan_colored_stone', 16))
    .requireItem(Item.of('caveopolis:orange_colored_stone', 16))
    .requireItem(Item.of('minecraft:prismarine_crystals', 8))
    .requireItem(Item.of('minecraft:diamond', 4))

    .requireEnergyPerTick(20000)
    
    .produceItem(Item.of('caveopolis:color_crystal', 1))

    .resetOnError()
    })


//Dragon Core

onEvent('recipes', e => {
    e.recipes.custommachinery.custom_machine("caveopolis:everything_combiner", 260)
    .requireItem(Item.of('minecraft:dragon_head', 1), "input1")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input2")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input3")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input4")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input6")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input7")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input8")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input9")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input10")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input11")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input12")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input13")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input15")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input16")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input17")
    .requireItem(Item.of('minecraft:dragon_head', 1), "input18")
    .requireItem(Item.of('minecraft:dragon_breath', 8), "input5")
    .requireItem(Item.of('minecraft:dragon_breath', 8), "input14")

    .requireEnergyPerTick(20000)
    
    .produceItem(Item.of('caveopolis:dragon_core', 2))
    })

//Ultimate Shard

onEvent('recipes', e => {
    e.recipes.custommachinery.custom_machine("caveopolis:everything_combiner", 260)
    .requireItem(Item.of('morevanillalib:obsidian_shard', 8), "input1")
    .requireItem(Item.of('minecraft:amethyst_shard', 8), "input2")
    .requireItem(Item.of('caveopolis:bedrock_fragment', 8), "input3")
    .requireItem(Item.of('thermal:basalz_rod', 8), "input4")
    .requireItem(Item.of('minecraft:prismarine_shard', 8), "input6")
    .requireItem(Item.of('caveopolis:bedrock_fragment', 8), "input7")
    .requireItem(Item.of('minecraft:amethyst_shard', 8), "input8")
    .requireItem(Item.of('morevanillalib:obsidian_shard', 8), "input9")
    .requireItem(Item.of('caveopolis:bedrock_fragment', 8), "input10")
    .requireItem(Item.of('minecraft:amethyst_shard', 8), "input11")
    .requireItem(Item.of('morevanillalib:obsidian_shard', 8), "input12")
    .requireItem(Item.of('minecraft:prismarine_shard', 8), "input13") 
    .requireItem(Item.of('thermal:basalz_rod', 8), "input15")
    .requireItem(Item.of('morevanillalib:obsidian_shard', 8), "input16")
    .requireItem(Item.of('minecraft:amethyst_shard', 8), "input17")
    .requireItem(Item.of('caveopolis:bedrock_fragment', 8), "input18")
    .requireItem(Item.of('rftoolsbase:dimensionalshard', 4), "input5")
    .requireItem(Item.of('rftoolsbase:dimensionalshard', 4), "input14")

    .requireEnergyPerTick(20000)
    
    .produceItem(Item.of('caveopolis:ultimate_shard', 1))
    })

//The Ingot of Ingots

onEvent('recipes', e => {
    e.recipes.custommachinery.custom_machine("caveopolis:everything_combiner", 260)
    .requireItem(Item.of('mekanism:ingot_refined_glowstone', 4), "input1")
    .requireItem(Item.of('mekanism:ingot_uranium', 4), "input2")
    .requireItem(Item.of('caveopolis:soulsteel_ingot', 4), "input3")
    .requireItem(Item.of('minecraft:netherite_ingot', 4), "input4")
    .requireItem(Item.of('thermal:steel_ingot', 4), "input6")
    .requireItem(Item.of('thermal:rose_gold_ingot', 4), "input7")
    .requireItem(Item.of('thermal:lead_ingot', 4), "input8")
    .requireItem(Item.of('mekanism:ingot_osmium', 4), "input9")
    .requireItem(Item.of('mekanism:ingot_refined_obsidian', 4), "input10")
    .requireItem(Item.of('thermal:nickel_ingot', 4), "input11")
    .requireItem(Item.of('thermal:bronze_ingot', 4), "input12")
    .requireItem(Item.of('thermal:electrum_ingot', 4), "input13") 
    .requireItem(Item.of('thermal:invar_ingot', 4), "input15")
    .requireItem(Item.of('thermal:constantan_ingot', 4), "input16")
    .requireItem(Item.of('thermal:signalum_ingot', 4), "input17")
    .requireItem(Item.of('thermal:lumium_ingot', 4), "input18")
    .requireItem(Item.of('thermal:enderium_ingot', 4), "input5")
    .requireItem(Item.of('caveopolis:mixed_stone_ingot', 4), "input14")

    .requireEnergyPerTick(25000)
    
    .produceItem(Item.of('caveopolis:ingot_of_ingots', 1))
    })






//Block Recipe
    
onEvent('recipes', e => {
    e.shaped(Item.of('custommachinery:custom_machine_item', '{machine:"caveopolis:everything_combiner"}'), ['QWE','RTY', 'ASD'], 
    {Q: Item.of('custommachinery:custom_machine_item', '{machine:"caveopolis:water_generator"}'), 
    W: Item.of('custommachinery:custom_machine_item', '{machine:"caveopolis:alloy_mixer"}'), 
    E: Item.of('custommachinery:custom_machine_item', '{machine:"caveopolis:bedrock_infuser"}'), 
    R: Item.of('custommachinery:custom_machine_item', '{machine:"caveopolis:fragment_combiner"}'), 
    T: Item.of('custommachinery:custom_machine_item', '{machine:"caveopolis:ore_extractor"}'), 
    Y: Item.of('custommachinery:custom_machine_item', '{machine:"caveopolis:organic_producer"}'), 
    A: Item.of('custommachinery:custom_machine_item', '{machine:"caveopolis:soul_forge"}'), 
    S: Item.of('custommachinery:custom_machine_item', '{machine:"caveopolis:advanced_barrel"}'), 
    D: Item.of('custommachinery:custom_machine_item', '{machine:"caveopolis:dragon_infuser"}')}
).id('caveopolis:everything_combiner')})