ServerEvents.recipes(event => { 
    let bat = 'indrev:battery'
    let mk1_c = 'indrev:circuit_mk1'
    let mb = 'indrev:machine_block'

    event.remove({output: 'indrev:electric_furnace_mk1'})
    event.shaped('indrev:electric_furnace_mk1', [
        ' C ',
        'IFI',
        'IBI'
    ], {
        C: mk1_c,
        B: bat,
        I: 'create:iron_sheet',
        F: 'minecraft:furnace'
    })

    event.remove({output: 'indrev:sawmill_mk1'})
    event.shaped('indrev:sawmill_mk1', [
        ' C ',
        'TMT',
        'TBT'
    ], {
        C: mk1_c,
        B: bat,
        M: mb,
        T: 'kubejs:tin_sheet',
    })

    event.replaceInput({mod: 'indrev'}, 'modern_industrialization:bronze_plate', 'kubejs:nickel_sheet')
    event.replaceInput({mod: 'indrev'}, 'modern_industrialization:tin_plate', 'kubejs:tin_sheet')
    event.replaceInput({mod: 'indrev'}, 'modern_industrialization:silver_plate', 'kubejs:silver_sheet')
    event.replaceInput({mod: 'indrev'}, 'modern_industrialization:lead_plate', 'kubejs:lead_sheet')
    event.replaceInput({mod: 'indrev'}, 'modern_industrialization:electrum_plate', 'kubejs:red_alloy_sheet')
    event.replaceInput({mod: 'indrev'}, 'modern_industrialization:steel_plate', 'kubejs:dark_silver_sheet')

    event.remove({mod: 'indrev', output: 'modern_industrialization:bronze_plate'})
    event.remove({mod: 'indrev', output: 'modern_industrialization:electrum_plate'})
    event.remove({mod: 'indrev', output: 'modern_industrialization:lead_plate'})
    event.remove({mod: 'indrev', output: 'modern_industrialization:silver_plate'})
    event.remove({mod: 'indrev', output: 'modern_industrialization:steel_plate'})
    event.remove({mod: 'indrev', output: 'modern_industrialization:tin_plate'})
    event.remove({mod: 'indrev', output: 'modern_industrialization:tungsten_plate'})

    event.remove({output: 'indrev:empty_enhancer'})

    event.recipes.createPressing(['kubejs:tin_sheet'], ['modern_industrialization:tin_ingot'])
    event.recipes.indrev.compress({
        type: "indrev:compress",
        ingredients: {
            item: "modern_industrialization:tin_ingot",
            count: 1
        },
        output: {
            item: "kubejs:tin_sheet",
            count: 1
        },
        processTime: 200
    });

    event.recipes.indrev.compress({
        type: "indrev:compress",
        ingredients: {
            item: "kubejs:tin_sheet",
            count: 4
        },
        output: {
            item: "indrev:empty_enhancer",
            count: 1
        },
        processTime: 300
    });

    event.recipes.createPressing(['kubejs:silver_sheet'], ['modern_industrialization:silver_ingot'])
    event.recipes.indrev.compress({
        type: "indrev:compress",
        ingredients: {
            item: "modern_industrialization:silver_ingot",
            count: 1
        },
        output: {
            item: "kubejs:silver_sheet",
            count: 1
        },
        processTime: 300
    });

    event.recipes.createPressing(['kubejs:nickel_sheet'], ['modern_industrialization:nickel_ingot'])
    event.recipes.indrev.compress({
        type: "indrev:compress",
        ingredients: {
            item: "modern_industrialization:nickel_ingot",
            count: 1
        },
        output: {
            item: "kubejs:nickel_sheet",
            count: 1
        },
        processTime: 300
    });

    event.recipes.createPressing(['kubejs:lead_sheet'], ['modern_industrialization:lead_ingot'])
    event.recipes.indrev.compress({
        type: "indrev:compress",
        ingredients: {
            item: "modern_industrialization:lead_ingot",
            count: 1
        },
        output: {
            item: "kubejs:lead_sheet",
            count: 1
        },
        processTime: 300
    });

    event.recipes.createPressing(['kubejs:red_alloy_sheet'], ['kubejs:red_alloy_ingot'])
    event.recipes.indrev.compress({
        type: "indrev:compress",
        ingredients: {
            item: "kubejs:red_alloy_ingot",
            count: 1
        },
        output: {
            item: "kubejs:red_alloy_sheet",
            count: 1
        },
        processTime: 300
    });

    event.recipes.indrev.infuse({
        type: "indrev:infuse",
        "ingredients": [
            {
              "item": "modern_industrialization:nickel_ingot"
            },
            {
              "item": "minecraft:redstone"
            }
          ],
        output: {
            item: "kubejs:red_alloy_ingot",
            count: 1
        },
        processTime: 300
    });

    event.recipes.indrev.infuse({
        type: "indrev:infuse",
        "ingredients": [
            {
              "item": "minecraft:coal"
            },
            {
              "item": "modern_industrialization:silver_ingot"
            }
          ],
        output: {
            item: "kubejs:dark_silver_ingot",
            count: 1
        },
        processTime: 300
    });

    event.recipes.indrev.infuse({
        type: "indrev:infuse",
        "ingredients": [
            {
              "item": "minecraft:charcoal",
            },
            {
              "item": "modern_industrialization:silver_ingot"
            }
          ],
        output: {
            item: "kubejs:dark_silver_ingot",
            count: 2
        },
        processTime: 300
    });

    event.recipes.createPressing(['kubejs:dark_silver_sheet'], ['kubejs:dark_silver_ingot'])
    event.recipes.indrev.compress({
        type: "indrev:compress",
        ingredients: {
            item: "kubejs:dark_silver_ingot",
            count: 1
        },
        output: {
            item: "kubejs:dark_silver_sheet",
            count: 1
        },
        processTime: 300
    });

    event.remove({id: 'indrev:infusing/steel_dust'})

    event.recipes.createCompacting(['kubejs:dark_silver_block'], ['9x kubejs:dark_silver_ingot'])
    event.shapeless('9x kubejs:dark_silver_ingot', [
		'kubejs:dark_silver_block'
	])

    event.recipes.indrev.pulverize({
        type: "indrev:pulverize",
        ingredients: {
            item: "modern_industrialization:raw_nickel",
            count: 2
        },
        output: {
            item: "modern_industrialization:nickel_dust",
            count: 3
        },
        processTime: 300
    });

    // event.remove({id: 'indrev:pulverizer/tungsten_dust_from_ore'})
    // event.remove({id: 'indrev:pulverizer/tin_dust_from_ore'})
    // event.remove({id: 'indrev:pulverizer/silver_dust_from_ore'})
    // event.remove({id: 'indrev:pulverizer/lead_dust_from_ore'})
    // event.remove({id: 'indrev:pulverizer/iron_dust_from_ore'})
    // event.remove({id: 'indrev:pulverizer/gold_dust_from_ore'})

    // const recipes = [
    //     {input: "#c:nickel_ores",   output: "modern_industrialization:nickel_dust"},
    //     {input: "#c:tungsten_ores", output: "modern_industrialization:tungsten_dust"},
    //     {input: "#c:tin_ores",      output: "modern_industrialization:tin_dust"},
    //     {input: "#c:silver_ores",   output: "modern_industrialization:silver_dust"},
    //     {input: "#c:lead_ores",     output: "modern_industrialization:lead_dust"},
    //     {input: "#c:iron_ores",     output: "modern_industrialization:iron_dust"},
    //     {input: "#c:gold_ores",     output: "modern_industrialization:gold_dust"},
    //     // Add more recipes here
    // ];
    
    // recipes.forEach(recipe => {
    //     event.recipes.indrev.pulverize({
    //         type: "indrev:pulverize",
    //         ingredients: {
    //             tag: recipe.input, // Using the "tag" property instead of "item"
    //             count: 1
    //         },
    //         output: {
    //             item: recipe.output,
    //             count: 2 // Set your desired output count here
    //         },
    //         processTime: 300
    //     });
    // });
    
    
})