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

    const id_prefix = 'industrialforegoing:kubejs/fluid_extractor';

    const recipes = [
        {
            fluid: {
                name: 'thermal:resin',
                amount: 6
            },
            input: 'minecraft:spruce_log',
            output: 'minecraft:stripped_spruce_log',
            id: 'resin_from_spruce'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:witch_hazel_log',
            output: 'byg:stripped_witch_hazel_log',
            id: 'resin_from_witch_hazel'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:palo_verde_log',
            output: 'byg:stripped_palo_verde_log',
            id: 'resin_from_palo_verde'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 6
            },
            input: 'byg:aspen_log',
            output: 'byg:stripped_aspen_log',
            id: 'resin_from_aspen'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:ebony_log',
            output: 'byg:stripped_ebony_log',
            id: 'resin_from_ebony'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'minecraft:birch_log',
            output: 'minecraft:stripped_birch_log',
            id: 'resin_from_birch'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'minecraft:oak_log',
            output: 'minecraft:stripped_oak_log',
            id: 'resin_from_oak'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:holly_log',
            output: 'byg:stripped_holly_log',
            id: 'resin_from_holly'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:cypress_log',
            output: 'byg:stripped_cypress_log',
            id: 'resin_from_cypress'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:zelkova_log',
            output: 'byg:stripped_zelkova_log',
            id: 'resin_from_zelkova'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:willow_log',
            output: 'byg:stripped_willow_log',
            id: 'resin_from_willow'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:jacaranda_log',
            output: 'byg:stripped_jacaranda_log',
            id: 'resin_from_jacaranda'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:green_enchanted_log',
            output: 'byg:stripped_green_enchanted_log',
            id: 'resin_from_green_enchanted'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:redwood_log',
            output: 'byg:stripped_redwood_log',
            id: 'resin_from_redwood'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'minecraft:acacia_log',
            output: 'minecraft:stripped_acacia_log',
            id: 'resin_from_acacia'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:pine_log',
            output: 'byg:stripped_pine_log',
            id: 'resin_from_pine'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:mahogany_log',
            output: 'byg:stripped_mahogany_log',
            id: 'resin_from_mahogany'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:mangrove_log',
            output: 'byg:stripped_mangrove_log',
            id: 'resin_from_mangrove'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:cherry_log',
            output: 'byg:stripped_cherry_log',
            id: 'resin_from_cherry'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:blue_enchanted_log',
            output: 'byg:stripped_blue_enchanted_log',
            id: 'resin_from_blue_enchanted'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:cika_log',
            output: 'byg:stripped_cika_log',
            id: 'resin_from_cika'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:fir_log',
            output: 'byg:stripped_fir_log',
            id: 'resin_from_fir'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:rainbow_eucalyptus_log',
            output: 'byg:stripped_rainbow_eucalyptus_log',
            id: 'resin_from_rainbow_eucalyptus'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:baobab_log',
            output: 'byg:stripped_baobab_log',
            id: 'resin_from_baobab'
        },
        {
            fluid: {
                name: 'thermal:resin',
                amount: 4
            },
            input: 'byg:skyris_log',
            output: 'byg:stripped_skyris_log',
            id: 'resin_from_skyris'
        },
        {
            fluid: {
                name: 'thermal:latex',
                amount: 4
            },
            input: 'minecraft:jungle_log',
            output: 'minecraft:stripped_jungle_log',
            id: 'latex_from_jungle'
        }
    ];

    recipes.forEach(recipe => {

        event.custom({
            type: 'industrialforegoing:fluid_extractor',
            input: { item: recipe.input },
            result: recipe.output,
            breakChance: 0.005,
            output: `{FluidName:"${recipe.fluid.name}", Amount:${recipe.fluid.amount}}`,
            defaultRecipe: false
        }).id(`${id_prefix}/${recipe.id}`);

        event.custom({
            type: 'industrialforegoing:fluid_extractor',
            input: { item: recipe.output },
            result: 'minecraft:air',
            breakChance: 0.005,
            output: `{FluidName:"${recipe.fluid.name}", Amount:${recipe.fluid.amount/2}}`,
            defaultRecipe: false
        }).id(`${id_prefix}/${recipe.id}_stripped`);

    })

})