
let IE_raw_ore = ["aluminum","lead","silver","nickel","uranium"]
let C_evo_stones = ["dawn","dusk","fire","ice","leaf","moon","shiny","sun","thunder","water",]

ServerEvents.recipes(event => {
    IE_raw_ore.forEach(a=>{
            event.custom({
            "type":"minecraft:smelting",
            "ingredient":{
                "item":"immersiveengineering:raw_block_"+a
            },
            "result":"immersiveengineering:storage_"+a,
            "experience": 6.3,
            "cookingtime": 1800
        }).id("tomtaru:raw_"+a+"_block_smelting")
        event.custom({
            "type":"minecraft:blasting",
            "ingredient":{
                "item":"immersiveengineering:raw_block_"+a
            },
            "result":"immersiveengineering:storage_"+a,
            "experience": 6.3,
            "cookingtime": 900
        }).id("tomtaru:raw_"+a+"_block_blasting")
    })

    event.custom({
        "type":"minecraft:smelting",
        "ingredient":{
            "item":"byg:raw_pendorite_block"
        },
        "result":{
            "item":"byg:pendorite_scraps",
            "amount":9
        },
        "experience": 6.3,
        "cookingtime": 1800
    }).id("tomtaru:raw_pendorite_block_smelting")
    event.custom({
        "type":"minecraft:blasting",
        "ingredient":{
            "item":"byg:raw_pendorite_block"
        },
        "result":{
            "item":"byg:pendorite_scraps",
            "amount":9
        },
        "experience": 6.3,
        "cookingtime": 900
    }).id("tomtaru:raw_pendorite_block_blasting")

    event.custom({
        "type":"immersiveengineering:arc_furnace",
        "additives":[],
        "energy":512000,
        "input":{
            "item":"byg:raw_pendorite"
            },
        "results":[
            {
                "count":2,
                "item":"byg:pendorite_scraps"
            }
        ],
        "slag":{
            "tag":"forge:slag"
        },
        "time":100  
    }).id("tomtaru:arc_furnace_raw_pendorite")
    event.custom({
        "type":"immersiveengineering:arc_furnace",
        "additives":[],
        "energy":1152000,
        "input":{
            "item":"byg:raw_pendorite_block"
            },
        "results":[
            {
                "item":"byg:pendorite_scraps",
                "count":13
            }
        ],
        "secondaries":[
            {
                "chance":0.5,
                "output":{
                    "item":"byg:pendorite_scraps"
                }
            }
        ],
        "slag":{
            "tag":"forge:slag"
        },
        "time":100  
    }).id("tomtaru:arc_furnace_raw_pendorite_block")
    event.custom({
        "type":"immersiveengineering:arc_furnace",
        "additives":[],
        "energy":1152000,
        "input":{
            "item":"byg:pendorite_ore"
            },
        "results":[
            {
                "item":"byg:pendorite_scraps",
                "count":2
            }
        ],
        "secondaries":[],
        "slag":{
            "tag":"forge:slag"
        },
        "time":100  
    }).id("tomtaru:arc_furnace_pendorite_ore")
    event.custom({
        "type":"immersiveengineering:crusher",
        "energy":6000,
        "input":{
            "item":"byg:emeraldite_ore"
        },
        "result":{
            "base_ingredient":{
                "item":"byg:emeraldite_shards"
            },
            "count":3
        },
        "secondaries":[
            {
                "chance":0.25,
                "output":{
                    "item":"byg:emeraldite_shards"
                }
            }
        ]
    }).id("tomtaru:crusher_emeraldite")
    C_evo_stones.forEach(a=>{
        event.custom({
            "type":"immersiveengineering:crusher",
            "energy":6000,
            "input":{
                "item":"cobblemon:"+a+"_stone_ore"
            },
            "result":{
                "base_ingredient":{
                    "item":"cobblemon:"+a+"_stone"
                },
                "count":2
            },
            "secondaries":[
                {
                    "chance":0.25,
                    "output":{
                        "item":"byg:emeraldite_shards"
                    }
                }
            ]
        }).id("tomtaru:crusher_"+a+"_stone_ore")
        event.custom({
            "type":"immersiveengineering:crusher",
            "energy":6000,
            "input":{
                "item":"cobblemon:deepslate_"+a+"_stone_ore"
            },
            "result":{
                "base_ingredient":{
                    "item":"cobblemon:"+a+"_stone"
                },
                "count":2
            },
            "secondaries":[
                {
                    "chance":0.25,
                    "output":{
                        "item":"byg:emeraldite_shards"
                    }
                }
            ]
        }).id("tomtaru:crusher_deepslate_"+a+"_stone_ore")
    })
    event.custom({
        "type":"immersiveengineering:crusher",
        "energy":6000,
        "input":{
            "item":"cobblemon:dripstone_moon_stone_ore"
        },
        "result":{
            "base_ingredient":{
                "item":"cobblemon:moon_stone"
            },
            "count":2
        },
        "secondaries":[
            {
                "chance":0.25,
                "output":{
                    "item":"byg:emeraldite_shards"
                }
            }
        ]
    }).id("tomtaru:crusher_dripstone_moon_stone_ore")
    event.custom({
        "type":"immersiveengineering:crusher",
        "energy":6000,
        "input":{
            "item":"byg:ametrine_ore"
        },
        "result":{
            "base_ingredient":{
                "item":"byg:ametrine_gems"
            },
            "count":3
        },
        "secondaries":[
            {
                "chance":0.25,
                "output":{
                    "item":"byg:ametrine_gems"
                }
            }
        ]
    }).id("tomtaru:crusher_ametrine")
    event.custom({
        "type":"immersiveengineering:crusher",
        "energy":6000,
        "input":{
            "item":"byg:anthracite_ore"
        },
        "result":{
            "base_ingredient":{
                "item":"byg:anthracite"
            },
            "count":4
        },
        "secondaries":[
            {
                "chance":0.5,
                "output":{
                    "item":"byg:anthracite"
                }
            }
        ]
    }).id("tomtaru:crusher_anthracite")

//temporary blaze powder recipes
    event.custom({
        "type":"immersiveengineering:hammer_crushing",
        "input":{
            "item":"cobblemon:fire_stone"
        },
        "result":{
            "item":"minecraft:blaze_powder",
            "count":3
        }
    }).id("tomtaru:hammer_crushing_blaze_powder")
    event.custom({
        "type":"immersiveengineering:crusher",
        "energy":6000,
        "input":{
            "item":"cobblemon:fire_stone"
        },
        "result":{
            "base_ingredient":{
                "item":"minecraft:blaze_powder"
            },
            "count":5
        },
        "secondaries":[
            {
                "chance":0.5,
                "output":{
                    "item":"minecraft:blaze_powder"
                }
            }
        ]
    }).id("tomtaru:crusher_blaze_powder")
})