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

  ☻/  * @file Nature's Aura recipes script
  /▌  * @copyright KnightDexx's Modded Minecraft World | ModernGamingWorld | GeekTechMedia
  /▌  * Mostly made by @Cyn-SolveroftheAbsoluteGremlins on Discord
  /\  

*/
ServerEvents.recipes(event => {

    //event.remove({mod: 'alltheores', item: '#alltheores:ore_hammers'})
    const dust = [
        'allthemodium',
        'vibranium',
        'unobtainium',
        'gold',
        'nickel',
        'tin',
        'platinum',
        'lead',
        'osmium',
        'iron',
        'iridium',
        'copper',
        'silver',
        'aluminum',
        'zinc',
        'uranium'
    ]
    const rodPlate = [
        'electrum',
        'platinum',
        'gold',
        'lumium',
        'silver',
        'osmium',
        'constantan',
        'uranium',
        'lead',
        'diamond',
        'brass',
        'invar',
        'enderium',
        'iridium',
        'zinc',
        'iron',
        'nickel',
        'signalum',
        'copper',
        'tin',
        'aluminum',
        'steel',
        'bronze'
    ]
    const gem = [
        'peridot',
        'sapphire',
        'ruby'
    ]
    const gemDust = [
        'peridot',
        'ruby',
        'sapphire',
        'diamond',
        'netherite'
    ]
    dust.forEach((dus) => {
        if(dus == 'gold' || dus == 'iron' || dus == 'copper') {
            event.shapeless(
                Item.of(`alltheores:${dus}_dust`, 2),
                [
                    '#alltheores:ore_hammers',
                    'minecraft:raw_' + dus
                ]
            ).id(`kubejs:${dus}_dust_from_hammer_crushing_manual_only`)
            event.remove({input: `minecraft:raw_${dus}`, input: '#alltheores:ore_hammers', output: `alltheores:${dus}_dust`})
        } else if (dus == 'allthemodium' || dus == 'vibranium' || dus == 'unobtainium') {
            event.shapeless(
                Item.of(`allthemodium:${dus}_dust`, 2),
                [
                    '#alltheores:ore_hammers',
                    'allthemodium:raw_' + dus
                ]
            ).id(`kubejs:${dus}_dust_from_hammer_crushing_manual_only`)
            event.remove({input: `allthemodium:raw_${dus}`, input: '#alltheores:ore_hammers', output: `allthemodium:${dus}_dust`})
        } else {
            event.shapeless(
                Item.of(`alltheores:${dus}_dust`, 2),
                [
                    '#alltheores:ore_hammers',
                    'alltheores:raw_' + dus
                ]
            ).id(`kubejs:${dus}_dust_from_hammer_crushing_manual_only`)
            event.remove({input: `alltheores:raw_${dus}`, input: '#alltheores:ore_hammers', output: `alltheores:${dus}_dust`})
        }
    })
    rodPlate.forEach((ing) => {
        if (ing == 'diamond') {
            event.shaped(
            Item.of(`alltheores:${ing}_rod`),
            [
                "  a",
                "ha ",
                "   "
            ],
            {
                a: `minecraft:${ing}`,
                h: '#alltheores:ore_hammers'
            }
        ).id(`kubejs:${ing}_rod_manual_only`)
        event.remove({input: '#alltheores:ore_hammers', output: `alltheores:${ing}_plate`})
        event.shaped(
            Item.of(`alltheores:${ing}_plate`),
            [
                "ha ",
                "a  ",
                "   "
            ],
            {
                a: `minecraft:${ing}`,
                h: '#alltheores:ore_hammers'
            }
        ).id(`kubejs:${ing}_plate_manual_only`)
        event.remove({input: '#alltheores:ore_hammers', output: `alltheores:${ing}_rod`})
        } else {
        event.shaped(
            Item.of(`alltheores:${ing}_rod`),
            [
                "  a",
                "ha ",
                "   "
            ],
            {
                a: `#forge:ingots/${ing}`,
                h: '#alltheores:ore_hammers'
            }
        ).id(`kubejs:${ing}_rod_manual_only`)
        event.remove({input: '#alltheores:ore_hammers', output: `alltheores:${ing}_plate`})
        event.shaped(
            Item.of(`alltheores:${ing}_plate`),
            [
                "ha ",
                "a  ",
                "   "
            ],
            {
                a: `#forge:ingots/${ing}`,
                h: '#alltheores:ore_hammers'
            }
        ).id(`kubejs:${ing}_plate_manual_only`)
        event.remove({input: '#alltheores:ore_hammers', output: `alltheores:${ing}_rod`})
        }
    })
    gem.forEach((ge) => {
        event.shapeless(
            Item.of(`alltheores:${ge}`, 3),
            [
                '#alltheores:ore_hammers',
                '#forge:ores/' + ge
            ]
        ).id(`kubejs:${ge}_from_hammer_crushing_manual_only`)
        event.remove({input: `#forge:ores/${ge}`, input: '#alltheores:ore_hammers', output: `alltheores:${ge}`})
    })
    gemDust.forEach((gemDus) => {
        if (gemDus == 'netherite') {
            event.shapeless(
                Item.of(`alltheores:${gemDus}_dust`),
                [
                    '#alltheores:ore_hammers',
                    '#forge:ingots/' + gemDus
                ]
            ).id(`kubejs:${gemDus}_dust_from_hammer_crushing_manual_only`)
            event.remove({input: `#forge:ingots/${gemDus}`, input: '#alltheores:ore_hammers', output: `alltheores:${gemDus}_dust`})
        } else {
            event.shapeless(
                Item.of(`alltheores:${gemDus}_dust`),
                [
                    '#alltheores:ore_hammers',
                    '#forge:gems/' + gemDus
                ]
            ).id(`kubejs:${gemDus}_dust_from_hammer_crushing_manual_only`)
            event.remove({input: `#forge:gems/${gemDus}`, input: '#alltheores:ore_hammers', output: `alltheores:${gemDus}_dust`})
        }
    })
    event.shapeless(
        Item.of('allthemodium:ancient_chiseled_stone_bricks'),
        [
            '#alltheores:ore_hammers',
            'allthemodium:ancient_cracked_stone_bricks'
        ]
    ).id('kubejs:ancient_chiseled_stone_bricks_from_crushing_manual_only')
    event.shapeless(
        Item.of('allthemodium:ancient_cracked_stone_bricks'),
        [
            '#alltheores:ore_hammers',
            'allthemodium:ancient_stone_bricks'
        ]
    ).id('kubejs:ancient_cracked_stone_bricks_from_crushing_manual_only')
    event.shaped(
        Item.of('alltheores:enderium_dust', 4),
        [
            "lll",
            "pee",
            "h  "
        ],
        {
            l: '#forge:dusts/lead',
            h: '#alltheores:ore_hammers',
            e: 'minecraft:ender_pearl',
            p: '#forge:dusts/platinum'
        }
    ).id(`kubejs:enderium_dust_from_alloy_blending_manual_only`)
    event.shaped(
        Item.of('alltheores:steel_dust'),
        [
            "dcc",
            "cch",
            "   "
        ],
        {
            d: '#forge:dusts/iron',
            h: '#alltheores:ore_hammers',
            c: 'minecraft:coal'
        }
    ).id('kubejs:steel_dust_from_alloy_blending_manual_only')
    event.remove({id: 'alltheores:steel_dust_from_alloy_blending'})
    event.remove({id: 'alltheores:enderium_dust_from_alloy_blending'})
    event.remove({id: 'allthemodium:ancient_cracked_stone_bricks_from_crushing'})
    event.remove({id: 'allthemodium:ancient_chiseled_stone_bricks_from_crushing'})
    
    event.remove({id: 'ad_astra:steel_rod'})
    event.remove({id: 'ad_astra:iron_rod'})
    event.remove({id: 'buildersaddition:iron_rod'})
})