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

    const id_prefix = 'immersiveengineering:kubejs/mineral_mix';

    const recipes = [
        {
            ores: [
                {chance:0.4, output: '#forge:stone'},
                {chance:0.2, output: '#forge:chunks/lead'},
                {chance:0.2, output: '#forge:chunks/silver'},
                {chance:0.2, output: '#forge:chunks/tin'},
            ],
            dimensions: ['minecraft:overworld'],
            weight: 15,
            fail_chance: 0.1,
            id: 'lead'
        },
        {
            ores: [
                {chance:0.4, output: '#forge:stone'},
                {chance:0.2, output: '#forge:chunks/copper'},
                {chance:0.2, output: '#forge:chunks/gold'},
                {chance:0.2, output: '#forge:chunks/zinc'},
            ],
            dimensions: ['minecraft:overworld'],
            weight: 30,
            fail_chance: 0.1,
            id: 'copper'
        },
        {
            ores: [
                {chance:0.4, output: '#forge:stone'},
                {chance:0.3, output: '#forge:chunks/iron'},
                {chance:0.3, output: '#forge:chunks/nickel'},
            ],
            dimensions: ['minecraft:overworld'],
            weight: 30,
            fail_chance: 0.1,
            id: 'iron'
        },
        {
            ores: [
                {chance:0.75, output: '#forge:chunks/coal'},
                {chance:0.2, output: '#forge:chunks/sulfur'},
                {chance:0.05, output: '#forge:chunks/diamond'}
            ],
            dimensions: ['minecraft:overworld', 'minecraft:the_nether'],
            weight: 20,
            fail_chance: 0.1,
            id: 'coal'
        },
        {
            ores: [
                {chance:0.4, output: '#forge:stone'},
                {chance:0.4, output: '#forge:chunks/redstone'},
                {chance:0.2, output: '#forge:chunks/cinnabar'}
            ],
            dimensions: ['minecraft:overworld', 'minecraft:the_nether'],
            weight: 15,
            fail_chance: 0.1,
            id: 'redstone'
        },
        {
            ores: [
                {chance:0.6, output: '#forge:chunks/lapis'},
                {chance:0.35, output: '#forge:chunks/apatite'},
                {chance:0.05, output: '#forge:chunks/emerald'}
            ],
            dimensions: ['minecraft:overworld'],
            weight: 15,
            fail_chance: 0.1,
            id: 'lapis'
        },
        {
            ores: [
                {chance:0.4, output: '#forge:chunks/quartz'},
                {chance:0.3, output: '#forge:chunks/potassium_nitrate'},
                {chance:0.3, output: '#forge:chunks/fluorite'}
            ],
            dimensions: ['minecraft:overworld', 'minecraft:the_nether'],
            weight: 15,
            fail_chance: 0.1,
            id: 'quartz'
        },
        {
            ores: [
                {chance:0.6, output: Item.of('minecraft:gravel').toJson()},
                {chance:0.2, output: Item.of('minecraft:ancient_debris').toJson()},
                {chance:0.2, output: Item.of('emendatusenigmatica:sulfur_dust').toJson()}
            ],
            dimensions: ['minecraft:the_nether'],
            weight: 5,
            fail_chance: 0.7,
            id: 'ancient_debris'
        },
        {
            ores: [
                {chance:0.4, output: Item.of('minecraft:netherrack').toJson()},
                {chance:0.25, output: '#forge:chunks/aluminum'},
                {chance:0.25, output: '#forge:chunks/cobalt'},
                {chance:0.1, output: '#forge:chunks/iron'}
            ],
            dimensions: ['minecraft:the_nether'],
            weight: 10,
            fail_chance: 0.1,
            id: 'aluminum'
        },
        {
            ores: [
                {chance:0.1, output: '#forge:ores/nebu'},
                {chance:0.3, output: '#forge:ores/relic'},
                {chance:0.4, output: '#forge:ores/bone'},
                {chance:0.2, output: '#forge:stone/khnumite'}
            ],
            dimensions: ['atum:atum'],
            weight: 10,
            fail_chance: 0.4,
            id: 'atum'
        },
        {
            ores: [
                {chance:0.25, output: '#forge:ores/rock_crystal'},
                {chance:0.7, output: Item.of('astralsorcery:aquamarine_sand_ore').toJson()},
                {chance:0.05, output: '#forge:ores/starmetal'}
            ],
            dimensions: ['atum:atum'],
            weight: 5,
            fail_chance: 0.2,
            id: 'aquamarine'
        },
        {
            ores: [
                {chance:0.7, output: Item.of('minecraft:netherrack').toJson()},
                {chance:0.1, output: '#forge:ores/iesnium'},
                {chance:0.2, output: Item.of('occultism:otherworld_leaves').toJson()}
            ],
            dimensions: ['minecraft:the_nether'],
            weight: 5,
            fail_chance: 0.5,
            id: 'iesnium'
        },
        {
            ores: [
                {chance:0.7, output: Item.of('minecraft:end_stone').toJson()},
                {chance:0.3, output: '#forge:ores/titanium'}
            ],
            dimensions: ['minecraft:the_end'],
            weight: 5,
            fail_chance: 0.4,
            id: 'titanium'
        },
        {
            ores: [
                {chance:0.7, output: Item.of('minecraft:end_stone').toJson()},
                {chance:0.3, output: '#forge:ores/chromium'}
            ],
            dimensions: ['minecraft:the_end'],
            weight: 5,
            fail_chance: 0.4,
            id: 'chromium'
        },
        {
            ores: [
                {chance:0.65, output: Item.of('minecraft:end_stone').toJson()},
                {chance:0.35, output: '#forge:ores/biotite'}
            ],
            dimensions: ['minecraft:the_end'],
            weight: 10,
            fail_chance: 0.4,
            id: 'biotite'
        }
    ];

    recipes.forEach(recipe => {
        recipe.type = 'immersiveengineering:mineral_mix';
        event.custom(recipe).id(`${id_prefix}/${recipe.id}`);
    })

})