//Priority: 100
/**
  
  █▀▄▀█ █▀█ █▄░█ █░█ █▀▄▀█ █▀▀ █▄░█ ▀█▀ ▄▀█ █░░   █▀▀ ▀▄▀ █▀█ █▀▀ █▀█ █ █▀▀ █▄░█ █▀▀ █▀▀
  █░▀░█ █▄█ █░▀█ █▄█ █░▀░█ ██▄ █░▀█ ░█░ █▀█ █▄▄   ██▄ █░█ █▀▀ ██▄ █▀▄ █ ██▄ █░▀█ █▄▄ ██▄

  ☻/  * @file Recipe Correction recipes script
  /▌  * @copyright KnightDexx's Modded Minecraft World | ModernGamingWorld | GeekTechMedia |
  /▌  * Modified by @Cyn-SolveroftheAbsoluteGremlins on Discord
  /\  

*/
ServerEvents.recipes(event => {

    const correct = [
        'forcecraft:transmutation/irom_ingot_from_cauldron',
        'mysticalagriculture:essence/extremereactors2/yellorium_ingot',
        'bigreactors:crafting/yellorium_nugget_to_ingot',
        'thermal:furnace_1698891930',
        'tconstruct:smeltery/melting/metal/zinc/geore/bud_large',
        'tconstruct:smeltery/melting/metal/zinc/geore/bud_medium',
        'tconstruct:smeltery/melting/metal/zinc/geore/bud_small',
        'tconstruct:smeltery/melting/metal/zinc/geore/cluster',
        'farmersdelight:wheat_dought_from_water_and_flour'
    ]
    const brokeHydrogen = [
        'unobtainium',
        'silver',
        'vibranium',
        'tin',
        'zinc',
        'platinum',
        'lead',
        'nickel',
        'osmium',
        'copper',
        'aluminum',
        'iridium',
        'uranium',
        'allthemodium'
    ]

    correct.forEach((rec => {
        event.remove({id: rec})
    }))

    let modName = 'alltheores'
    brokeHydrogen.forEach((ing => {
        if (ing == 'allthemodium' || ing == 'vibranium' || ing == 'unobtainium') {
            modName = 'allthemodium'
        } else {modName = 'alltheores'}
        event.custom({
            "type": "create:filling",
            "ingredients": [
                {
                    "tag": `forge:crystals/${ing}`
                },
                {
                    "amount": 300,
                    "fluidTag": "forge:hydrogen_chloride"
                }
            ],
            "results": [
                {
                    "item": modName + ":" + ing + "_shard"
                }
            ]
        }).id(`kubejs:create/filling/${ing}_crystal`)
        
        event.custom({
            "type": "create:filling",
            "ingredients": [
                {
                    "tag": `forge:ores/${ing}`
                },
                {
                    "amount": 300,
                    "fluidTag": "forge:hydrogen_chloride"
                }
            ],
            "results": [
                {
                    "item": `${modName}:${ing}_shard`,
                    "count": 4
                }
            ]
        }).id(`kubejs:create/filling/${ing}_ore`)
        
        event.custom({
            "type": "create:filling",
            "ingredients": [
                {
                    "tag": `forge:storage_blocks/raw_${ing}`,
                    "count": 3
                },
                {
                    "amount": 300,
                    "fluidTag": "forge:hydrogen_chloride"
                }
            ],
            "results": [
                {
                    "item": `${modName}:${ing}_shard`,
                    "count": 8
                }
            ]
        }).id(`kubejs:create/filling/${ing}_raw_block`)
        
        event.custom({
            "type": "create:filling",
            "ingredients": [
                {
                    "tag": `forge:raw_materials/${ing}`
                },
                {
                    "amount": 300,
                    "fluidTag": "forge:hydrogen_chloride"
                }
            ],
            "results": [
                {
                    "item": `${modName}:${ing}_shard`,
                    "count": 24
                }
            ]
        }).id(`kubejs:create/filling/${ing}_raw`)
        event.remove({id: `allthecompatibility:create/filling/${ing}_crystal`})
        event.remove({id: `allthecompatibility:create/filling/${ing}_ore`})
        event.remove({id: `allthecompatibility:create/filling/${ing}_raw_block`})
        event.remove({id: `allthecompatibility:create/filling/${ing}_raw`})
    }))

    event.remove({output: 'thermal:netherite_gear'})
    event.remove({input: 'thermal:netherite_gear'})
    event.remove({output: 'thermal:rose_gold_gear'})
    event.remove({input: 'thermal:rose_gold_gear'})
})