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

    const id_prefix = 'immersiveengineering:kubejs/sawmill';
    const recipes = [
        {
            input: 'astralsorcery:infused_wood',
            output: '6x astralsorcery:infused_wood_planks',
            extraOutput: Item.of('emendatusenigmatica:wood_dust'),
            id: 'infused_wood_planks'
        },
        {
            input: 'astralsorcery:colored_lens_spectral',
            output: 'occultism:lenses',
            extraOutput: Item.of('occultism:spirit_attuned_gem').withChance(0.5),
            id: 'lenses'
        },
        {
            input: 'occultism:otherstone',
            output: 'occultism:otherstone_frame',
            id: 'otherstone_frame'
        },
        {
            input: 'occultism:otherstone_slab',
            output: 'occultism:otherstone_tablet',
            id: 'otherstone_tablet'
        },
        {
            input: 'appliedenergistics2:purified_nether_quartz_crystal',
            output: '2x emendatusenigmatica:quartz_crystal',
            id: 'quartz_crystal'
        },
        {
            input: 'appliedenergistics2:purified_certus_quartz_crystal',
            output: '2x emendatusenigmatica:certus_quartz_crystal',
            id: 'certus_quartz_crystal'
        }
    ];

    recipes.forEach((recipe) => {
         
        let extras = [];
        if(recipe.extraOutput){
            extras.push({ stripping: false, output: recipe.extraOutput })
        }

        event.recipes.immersiveengineering
            .sawmill(recipe.output, recipe.input, extras)
            .id(`${id_prefix}/${recipe.id}`);

    });
});
