const STEEL_INGOTS = [
    'create_ironworks:steel_ingot',
    'createbigcannons:steel_ingot',
    'createnuclear:steel_ingot',
    'tfmg:steel_ingot'
]

const STEEL_NUGGETS = [
    'create_ironworks:steel_nugget'
]

const SULPHUR_DUST = [
    'scguns:sulfur_dust'
]

const LEAD_INGOTS = [
    'oreganized:lead_ingot'
]

const BRONZE_INGOTS = [
    'createbigcannons:bronze_ingot'
]

const ZINC_SHEETS = [
    'createdeco:zinc_sheet',
    'vintage:zinc_sheet'
]

const BRONZE_NUGGETS = [
    'createbigcannons:bronze_scrap'
]

const TIN_INGOTS = [
    'caverns_and_chasms:tin_ingot'
]

const SILVER_INGOTS = [
    'caverns_and_chasms:silver_ingot'
]

const COAL_DUST = [
    'createnuclear:coal_dust'
]

const REMOVED_ITEMS = [
    'createnuclear:raw_lead_block',
    'oreganized:raw_lead_block',
    'oreganized:raw_silver_block',
    'createmetallurgy:raw_wolframite_block',
    'createbigcannons:bronze_block',
    'create_cogs_invaders:deepslate_sulfur_ore',
    'create_cogs_invaders:powdered_sulfur',
    'create_cogs_invaders:raw_sulfur_block',
    'create_cogs_invaders:sulfur_ore',
    'create_ironworks:_paxel',
    'create_ironworks:crushed_raw_tin',
    'createnuclear:coal_dust',
    'createnuclear:steel_block',
    'scguns:sulfur_chunk',
    'thinair:respirator',
    'vintage:sulphur',
    /^aquaculture:neptunium\w+/,
    /^chunkloaders:\w+/,
    /^create:crushed_raw_\w+/,
    /^create_ironworks:(copper|bronze|brass|gold|iron)_paxel$/,
    /^vintage:(?!zinc_rod|zinc_sheet|iron_spring|vanadium_ingot)\w+_(spring|wire|sheet|rod|ingot)$/,
]



ServerEvents.recipes(event => {
    STEEL_INGOTS.forEach(id => {
        event.remove({ output: id })
        event.replaceInput({}, id, 'createmetallurgy:steel_ingot');
    })

    STEEL_NUGGETS.forEach(id => {
        event.remove({ output: id })
        event.replaceInput({}, id, 'createnuclear:steel_nugget');
    })

    ZINC_SHEETS.forEach(id => {
        event.remove({ output: id })
        event.replaceInput({}, id, '#forge:plates/zinc')
    })

    BRONZE_INGOTS.forEach(id => {
        event.remove({output: id})
        event.replaceInput({}, id, 'create_ironworks:bronze_ingot')
    })

    BRONZE_NUGGETS.forEach(id => {
        event.remove({output: id})
        event.replaceInput({}, id, 'create_ironworks:bronze_nugget')
    })

    SULPHUR_DUST.forEach(id => {
        event.remove({ output: id })
        event.replaceInput({}, id, 'alexscaves:sulfur_dust');
    })

    LEAD_INGOTS.forEach(id => {
        event.remove({ output: id })
        event.replaceInput({}, id, 'createnuclear:lead_ingot');
    })

    TIN_INGOTS.forEach(id => {
        event.remove({ output: id })
        event.replaceInput({}, id, 'create_ironworks:tin_ingot')
    })

    // SILVER_INGOTS.forEach(id => {
    //     event.remove({ output: id })
    //     event.replaceInput({}, id, 'oreganized:silver_ingot')
    // })

    COAL_DUST.forEach(id => {
        event.remove({ output: id })
        event.replaceInput({}, id, 'create_ironworks:coal_dust');
    })

    REMOVED_ITEMS.forEach(id => {
        //event.remove({ input: id })
        event.remove({ output: id })
    })



    event.remove({ input: 'createmetallurgy:obdurium_block' })
    // event.remove({ input: 'createbigcannons:molten_bronze' })
    // event.remove({ input: 'createbigcannons:molten_steel' })
    event.remove({ output: 'createnuclear:steel_block'})



    // Iron to Steel inputs
    event.replaceInput({mod: 'scguns'}, 'minecraft:iron_ingot', '#forge:ingots/steel')
    event.replaceInput({mod: 'alexscaves'}, 'minecraft:iron_ingot', '#forge:ingots/steel')
    event.replaceInput({mod: 'protection_pixel'}, 'minecraft:iron_ingot', '#forge:ingots/steel')
    event.replaceInput({mod: 'immersive_aircraft'}, 'minecraft:iron_ingot', '#forge:ingots/steel')
    event.replaceInput({mod: 'immersive_aircraft'}, 'create:iron_sheet', '#forge:plates/steel')

    event.replaceInput({}, 'createbigcannons:molten_steel', 'createmetallurgy:molten_steel')
    event.replaceInput({}, 'createbigcannons:molten_bronze', 'createmetallurgy:molten_bronze')

    event.replaceOutput({}, 'createbigcannons:molten_steel', 'createmetallurgy:molten_steel')
    event.replaceOutput({}, 'createbigcannons:molten_bronze', 'createmetallurgy:molten_bronze')
});