var starlight_submerger_structure = [["       "," aaaaa "," a   a "," a   a "," a   a "," aaaaa ","       "],["  bbb  "," cdddc ","bdefedb","bdfgfdb","bdefedb"," cdddc ","  bbb  "],["       "," h   h ","       ","   m   ","       "," h   h ","       "],["       "," i   i ","       ","       ","       "," i   i ","       "]]
var starlight_submerger_structure_dictionary = {"a":"astralsorcery:marble_raw","b":"kubejs:starlight_submerger_casing","c":"astralsorcery:marble_chiseled","d":"astralsorcery:liquid_starlight[level=0]","e":"kubejs:aquamarine_block","f":"astralsorcery:marble_runed","g":"minecraft:gold_block","h":"astralsorcery:marble_pillar[pillartype=middle,waterlogged=false]","i":"kubejs:enriched_glowstone"}


onEvent('recipes', event => {

    //Star-Enriched Illumination Powder
    event.recipes.custommachinery.custom_machine("modpack:starlight_submerger", 10)
        .produceItem(Item.of("kubejs:star_enriched_illumination_powder", 20))
        .requireItem(Item.of("astralsorcery:illumination_powder", 5))
        .requireItem(Item.of("astralsorcery:stardust", 2))
        .requireFluid(Fluid.of("astralsorcery:liquid_starlight", 25))
        .requireEnergyPerTick(10)
        .requireStructure(starlight_submerger_structure, starlight_submerger_structure_dictionary)

    //Aquamarine-Enriched Marble Rod
    event.recipes.custommachinery.custom_machine("modpack:starlight_submerger", 10)
        .produceItem(Item.of("kubejs:aquamarine_enriched_marble_rod", 1))
        .requireItem(Item.of("kubejs:marble_rod", 2))
        .requireItem(Item.of("astralsorcery:aquamarine", 2))
        .requireFluid(Fluid.of("astralsorcery:liquid_starlight", 25))
        .requireEnergyPerTick(10)
        .requireStructure(starlight_submerger_structure, starlight_submerger_structure_dictionary)

    //Starmetal-Enriched Marble Rod
    event.recipes.custommachinery.custom_machine("modpack:starlight_submerger", 10)
        .produceItem(Item.of("kubejs:starmetal_enriched_marble_rod", 1))
        .requireItem(Item.of("kubejs:aquamarine_enriched_marble_rod", 2))
        .requireItem(Item.of("astralsorcery:starmetal_ingot", 1))
        .requireFluid(Fluid.of("astralsorcery:liquid_starlight", 25))
        .requireEnergyPerTick(10)
        .requireStructure(starlight_submerger_structure, starlight_submerger_structure_dictionary)

    //Infused Wood
    event.recipes.custommachinery.custom_machine("modpack:starlight_submerger", 10)
        .produceItem(Item.of("astralsorcery:infused_wood", 1))
        .requireItemTag("#minecraft:logs", 1)
        .requireFluid(Fluid.of("astralsorcery:liquid_starlight", 25))
        .requireEnergyPerTick(10)
        .requireStructure(starlight_submerger_structure, starlight_submerger_structure_dictionary)

    //Starmetal Lens
    event.recipes.custommachinery.custom_machine("modpack:starlight_submerger", 10)
        .produceItem(Item.of("kubejs:starmetal_lens", 1))
        .requireItem(Item.of("astralsorcery:glass_lens"))
        .requireItem(Item.of("astralsorcery:starmetal_ingot", 4))
        .requireFluid(Fluid.of("astralsorcery:liquid_starlight", 25))
        .requireEnergyPerTick(10)
        .requireStructure(starlight_submerger_structure, starlight_submerger_structure_dictionary)

    //Highly Enriched Illumination Powder
    event.recipes.custommachinery.custom_machine("modpack:starlight_submerger", 10)
        .produceItem(Item.of("kubejs:highly_enriched_illumination_powder", 5))
        .requireItem(Item.of("kubejs:infused_illumination_powder", 5))
        .requireItem(Item.of("kubejs:diamond_dust", 1))
        .requireFluid(Fluid.of("astralsorcery:liquid_starlight", 25))
        .requireEnergyPerTick(10)
        .requireStructure(starlight_submerger_structure, starlight_submerger_structure_dictionary)

    //Briliant Diamond
    event.recipes.custommachinery.custom_machine("modpack:starlight_submerger", 10)
        .produceItem(Item.of("kubejs:briliant_diamond", 1))
        .requireItem(Item.of("minecraft:diamond", 1))
        .requireItem(Item.of("astralsorcery:illumination_powder", 4))
        .requireFluid(Fluid.of("astralsorcery:liquid_starlight", 25))
        .requireEnergyPerTick(10)
        .requireStructure(starlight_submerger_structure, starlight_submerger_structure_dictionary)

    //Briliant Emerald
    event.recipes.custommachinery.custom_machine("modpack:starlight_submerger", 10)
        .produceItem(Item.of("kubejs:briliant_emerald", 1))
        .requireItem(Item.of("minecraft:emerald", 1))
        .requireItem(Item.of("astralsorcery:illumination_powder", 4))
        .requireFluid(Fluid.of("astralsorcery:liquid_starlight", 25))
        .requireEnergyPerTick(10)
        .requireStructure(starlight_submerger_structure, starlight_submerger_structure_dictionary)

    //Gilded Marble
    event.recipes.custommachinery.custom_machine("modpack:starlight_submerger", 10)
        .produceItem(Item.of("kubejs:gilded_marble", 6))
        .requireItem(Item.of("astralsorcery:marble_raw", 6))
        .requireItem(Item.of("minecraft:gold_ingot", 1))
        .requireFluid(Fluid.of("astralsorcery:liquid_starlight", 25))
        .requireEnergyPerTick(10)
        .requireStructure(starlight_submerger_structure, starlight_submerger_structure_dictionary)

    //Redstone-Enriched Marble
    event.recipes.custommachinery.custom_machine("modpack:starlight_submerger", 10)
        .produceItem(Item.of("kubejs:redstone_enriched_marble", 4))
        .requireItem(Item.of("kubejs:gilded_marble", 4))
        .requireItem(Item.of("minecraft:redstone", 8))
        .requireFluid(Fluid.of("astralsorcery:liquid_starlight", 25))
        .requireEnergyPerTick(10)
        .requireStructure(starlight_submerger_structure, starlight_submerger_structure_dictionary)

    //Illumination Powder
    event.recipes.custommachinery.custom_machine("modpack:starlight_submerger", 10)
        .produceItem(Item.of("astralsorcery:illumination_powder", 24))
        .requireItem(Item.of("minecraft:glowstone", 1))
        .requireItem(Item.of("minecraft:gold_ingot", 1))
        .requireFluid(Fluid.of("astralsorcery:liquid_starlight", 25))
        .requireEnergyPerTick(10)
        .requireStructure(starlight_submerger_structure, starlight_submerger_structure_dictionary)

    //Nocturnal Powder
    event.recipes.custommachinery.custom_machine("modpack:starlight_submerger", 10)
        .produceItem(Item.of("astralsorcery:nocturnal_powder", 12))
        .requireItem(Item.of("astralsorcery:illumination_powder", 4))
        .requireItem(Item.of("minecraft:lapis_block", 1))
        .requireFluid(Fluid.of("astralsorcery:liquid_starlight", 25))
        .requireEnergyPerTick(10)
        .requireStructure(starlight_submerger_structure, starlight_submerger_structure_dictionary)

    //Shining Gem
    event.recipes.custommachinery.custom_machine("modpack:starlight_submerger", 10)
        .produceItem(Item.of("kubejs:shining_gem", 40))
        .requireItem(Item.of("astralsorcery:aquamarine", 32))
        .requireItem(Item.of("astralsorcery:illumination_powder", 4))
        .requireFluid(Fluid.of("astralsorcery:liquid_starlight", 25))
        .requireEnergyPerTick(10)
        .requireStructure(starlight_submerger_structure, starlight_submerger_structure_dictionary)

})