// priority: 0

ServerEvents.recipes(event => {

    // List all the Caveopolis colors
    const colors = [
        'purple', 'red', 'yellow', 'green', 'orange', 'light_gray',
        'blue', 'light_blue', 'pink', 'magenta', 'brown', 'gray',
        'black', 'cyan', 'white', 'lime'
    ];

    // Loop through each color to automatically generate the NEC chest recipes
    colors.forEach(color => {
        event.shaped(
            `4x nec:caveop_${color}_colored_wooden_chest`,
            ['LLL', 'L L', 'LLL'],
            { L: `#caveopolis:${color}_colored_logs` }
        ).id(`submerged:nec_caveop_${color}_colored_wooden_chest`);
    });

    event.shaped(`1x caveopolis:raw_mixed_stone`, ['NN', 'NN'], { N: "caveopolis:mixed_stone_nugget" }).id(`submerged:raw_mixed_stone`)
    event.shaped(`1x caveopolis:mixed_stone_ore`, ['MSM', 'SMS', 'MSM'], { S: stone, M: "caveopolis:raw_mixed_stone" }).id(`submerged:mixed_stone_ore`)

    event.remove({ id: "caveopolis:colored_caves_portal" })
    event.replaceInput({ id: "caveopolis:sprayer/refill/black" }, "minecraft:blue_dye", "minecraft:black_dye")

})