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

    const id_prefix = 'immersiveengineering:kubejs/mineral';

    const recipes = [
        {
            ores: [
                {chance:0.2, output: '#forge:chunks/uranium'},
                {chance:0.3, output: '#forge:chunks/lead'},
                {chance:0.2, output: '#forge:chunks/osmium'},
                {chance:0.3, output: '#forge:chunks/silver'},
            ],
            dimensions: ['minecraft:overworld'],
            weight: 15,
            fail_chance: 0.05,
            id: 'lead'
        },
        {
            ores: [
                {chance:0.25, output: '#forge:chunks/copper'},
                {chance:0.25, output: '#forge:chunks/gold'},
                {chance:0.25, output: '#forge:chunks/tin'},
                {chance:0.25, output: '#forge:chunks/zinc'},
            ],
            dimensions: ['minecraft:overworld'],
            weight: 30,
            fail_chance: 0.05,
            id: 'copper'
        },
        {
            ores: [
                {chance:0.3, output: '#forge:chunks/iron'},
                {chance:0.3, output: '#forge:chunks/nickel'},
                {chance:0.3, output: '#forge:chunks/aluminum'},
                {chance:0.1, output: '#forge:chunks/cobalt'},
            ],
            dimensions: ['minecraft:overworld'],
            weight: 30,
            fail_chance: 0.05,
            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'],
            weight: 20,
            fail_chance: 0.1,
            id: 'coal'
        },
        {
            ores: [
                {chance:0.6, output: '#forge:chunks/redstone'},
                {chance:0.35, output: '#forge:chunks/cinnabar'},
                {chance:0.05, output: '#forge:chunks/ruby'}
            ],
            dimensions: ['minecraft:overworld'],
            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/sapphire'}
            ],
            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'],
            weight: 10,
            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: 8,
            fail_chance: 0.3,
            id: 'ancient_debris'
        },
        {
            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: Item.of('atum:khnumite').toJson()}
            ],
            dimensions: ['atum:atum'],
            weight: 10,
            fail_chance: 0.05,
            id: 'atum'
        },
        {
            ores: [
                {chance:0.2, output: '#forge:ores/rock_crystal'},
                {chance:0.7, output: '#forge:gems/aquamarine'},
                {chance:0.1, output: '#forge:chunks/emerald'}
            ],
            dimensions: ['minecraft:overworld'],
            weight: 5,
            fail_chance: 0.05,
            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.1,
            id: 'iesnium'
        }
    ];

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

})