onEvent('recipes', (event) => {

    const id_prefix = 'botania:runic_altar';

    const recipes = [
        {
            inputs: [
                '#forge:dusts/mana',
                'bloodmagic:reagentwater',
                'naturesaura:token_grief',
                '#forge:gears/manasteel',
                'thermal:diving_fabric',
                Item.of('atum:atems_bounty').ignoreNBT()
            ],
            mana: 8000,
            output: '2x botania:rune_water',
            id: 'water'
        },
        {
            inputs: [
                '#forge:dusts/mana',
                '#forge:plates/ruby',
                'astralsorcery:colored_lens_fire',
                '#forge:gears/manasteel',
                'occultism:afrit_essence',
                Item.of('immersiveengineering:flare').ignoreNBT()
            ],
            mana: 8000,
            output: '2x botania:rune_fire',
            id: 'fire'
        },
        {
            inputs: [
                '#forge:dusts/mana',
                'bloodmagic:hidden_knowledge_anointment_2',
                'astralsorcery:colored_lens_growth',
                '#forge:gears/manasteel',
                Item.of('immersiveengineering:drillhead_steel').ignoreNBT(),
                'botania:fertilizer'
            ],
            mana: 8000,
            output: '2x botania:rune_earth',
            id: 'earth'
        },
        {
            inputs: [
                '#forge:dusts/mana',
                'botania:ender_air_bottle',
                'astralsorcery:colored_lens_push',
                '#forge:gears/manasteel',
                'kubejs:scarab_wing',
                {
                    item: 'rftoolsutility:syringe',
                    type: 'nbt_ingredient_predicate:nbt_includes',
                    nbt: {
                        mobId: 'alexsmobs:spectre',
                        level: 10
                    }
                }
            ],
            mana: 8000,
            output: '2x botania:rune_air',
            id: 'air'
        },
        {
            inputs: [
                '#forge:dusts/mana',
                '#forge:ingots/manasteel',
                'botania:quartz_mana',
                'botania:manaweave_cloth',
                'botania:mana_pearl',
                'botania:mana_diamond'
            ],
            mana: 16000,
            output: 'botania:rune_mana',
            id: 'mana'
        },
        {
            inputs: [
                'botania:rune_water',
                'botania:rune_fire',
                'create:builders_tea',
                'twilightforest:charm_of_life_1',
                '#forge:gears/fairy',
                'appliedenergistics2:pink_paint_ball',
                'appliedenergistics2:pink_paint_ball',
                'kubejs:temporal_shard'
            ],
            mana: 10000,
            output: 'botania:rune_spring',
            id: 'spring'
        },
        {
            inputs: [
                'botania:rune_earth',
                'botania:rune_air',
                'astralsorcery:enchantment_amulet',
                'twilightforest:cicada',
                'appliedenergistics2:purified_certus_quartz_crystal',
                'appliedenergistics2:cyan_paint_ball',
                'appliedenergistics2:cyan_paint_ball',
                'kubejs:temporal_shard'
            ],
            mana: 10000,
            output: 'botania:rune_summer',
            id: 'summer'
        },
        {
            inputs: [
                'botania:rune_fire',
                'botania:rune_air',
                'immersivepetroleum:napalm_bucket',
                'alexsmobs:guster_eye',
                'powah:charged_snowball',
                'appliedenergistics2:orange_paint_ball',
                'appliedenergistics2:orange_paint_ball',
                'kubejs:temporal_shard'
            ],
            mana: 10000,
            output: 'botania:rune_autumn',
            id: 'autumn'
        },
        {
            inputs: [
                'botania:rune_water',
                'botania:rune_earth',
                'bloodmagic:duskritualstone',
                'twilightforest:alpha_fur',
                'kubejs:empty_quartz_lavender',
                'appliedenergistics2:white_paint_ball',
                'appliedenergistics2:white_paint_ball',
                'kubejs:temporal_shard'
            ],
            mana: 10000,
            output: 'botania:rune_winter',
            id: 'winter'
        }
    ];

    const tier3 = [
        {
            inputs: ['air', 'summer'],
            output: 'lust'
        },
        {
            inputs: ['fire', 'winter'],
            output: 'gluttony'
        },
        {
            inputs: ['water', 'spring'],
            output: 'greed'
        },
        {
            inputs: ['air', 'autumn'],
            output: 'sloth'
        },
        {
            inputs: ['earth', 'winter'],
            output: 'wrath'
        },
        {
            inputs: ['water', 'winter'],
            output: 'envy'
        },
        {
            inputs: ['fire', 'summer'],
            output: 'pride'
        }
    ];

    tier3.forEach(type => {
        recipes.push({
            inputs: [
                'twilightforest:carminite',
                'botania:quartz_elven',
                'minecraft:nether_star',
                `botania:rune_${type.inputs[1]}`,
                `botania:rune_${type.inputs[0]}`
            ],
            mana: 20000,
            output: `botania:rune_${type.output}`,
            id: type.output
        });
    })

    recipes.forEach((recipe) => {
        let ingredients = [];

        recipe.inputs.forEach((input) => {
            ingredients.push(Ingredient.of(input).toJson());
        });

        event.custom({
            type: 'botania:runic_altar',
            output: Item.of(recipe.output).toResultJson(),
            mana: recipe.mana,
            ingredients: ingredients
        }).id(`${id_prefix}/${recipe.id}`);
    });
});
