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

    const id_prefix = 'create:kubejs/splashing';

    const recipes = [
        {
            output: 'tconstruct:clear_glass', 
            input: 'minecraft:glass',
            id: 'clear_glass'
        },
        {
            output: 'atum:emmer_dough', 
            input: 'atum:emmer_flour',
            id: 'emmer_dough'
        }
    ];

    ores.forEach(ore => {

        var crushed = itemOf(`#create:crushed_ores/${ore}`);
        var nugget = itemOf(`#forge:nuggets/${ore}`);
        var gem = itemOf(`#forge:gems/${ore}`);

        var outputs = null;
        if(ore_results.has(ore)){
            let stack = ore_results.get(ore).item;
            if(stack.count % 3 == 0){
                outputs = [stack, Item.of(stack.item, stack.count*2/3).withChance(0.5)];
            }else{
                outputs = [stack, Item.of(stack).withChance(0.33)];
            }
        }else if(nugget != null) {
            outputs = [Item.of(nugget,10),Item.of(nugget,4).withChance(0.5)];
        }else if(gem != null) {
            outputs = [Item.of(gem,2), Item.of(gem,2).withChance(0.33)];
        }

        if(crushed!=null && outputs!=null){
            event.recipes.create.splashing(outputs, crushed).id(`create:splashing/crushed_${ore}_ore`);
        }

    });

    recipes.forEach((recipe) => {
        event.recipes.create.splashing(recipe.output, recipe.input).id(`${id_prefix}/${recipe.id}`);
    });

});