onEvent('recipes', (event) => {
    
    const id_prefix = 'apotheosis:kubejs/enchanting';

    const recipes = [
        {
            input: {
                item: 'apotheosis:seashelf',
                type: 'apotheosis:unenchanted'
            },
            result: {
                item: 'apotheosis:seashelf',
                nbt: '{"Enchantments":[{"id":"apotheosis:sea_infusion","lvl":3}]}'
            },
            requirements: {
                eterna: 20,
		        quanta: 15,
		        arcana: 10
            },
            id: 'apotheosis:enchanting/seashelf'
        },
        {
            input: {
                item: 'apotheosis:hellshelf',
                type: 'apotheosis:unenchanted'
            },
            result: {
                item: 'apotheosis:hellshelf',
                nbt: '{"Enchantments":[{"id":"apotheosis:hell_infusion","lvl":3}]}'
            },
            requirements: {
                eterna: 30,
		        quanta: 30,
		        arcana: 5
            },
            id: 'apotheosis:enchanting/hellshelf'
        },
        {
            input: Item.of('occultism:lenses').toJson(),
            result: Item.of('occultism:infused_lenses').toResultJson(),
            requirements: {
                eterna: 35,
		        quanta: 50,
		        arcana: 60
            },
            id: `${id_prefix}/infused_lenses`
        },
        {
            input: Item.of('botania:black_lotus').toJson(),
            result: Item.of('botania:blacker_lotus').toResultJson(),
            requirements: {
                eterna: 50,
		        quanta: 100,
		        arcana: 100
            },
            id: `${id_prefix}/blacker_lotus`
        }
    ];

    recipes.forEach(recipe => {

        recipe.type = 'apotheosis:enchanting';
        recipe.conditions = [{
            type: 'apotheosis:module',
            module: 'enchantment'
        }];

        if(!recipe.requirements){
            recipe.requirements = {
                eterna: -1,
		        quanta: -1,
		        arcana: -1
            }
        }

        event.custom(recipe).id(recipe.id);

    })

});
