ServerEvents.recipes(event => {
    function addTechSieve(inputBlock, outputItem, baseChance) {
        event.custom({
            type: "exdeorum:sieve",
            ingredient: {
                item: inputBlock
            },
            mesh: {
                item: "kubejs:industrial_mesh" 
            },
            result: {
                count: 1,
                id: outputItem
            },
            result_amount: {
                type: "minecraft:binomial",
                n: 1.0,
                p: baseChance 
            }
        })
    }

    // --- ДОБАВЛЯЕМ ИСКЛЮЧИТЕЛЬНО РЕСУРСЫ INDUSTRIAL UPGRADE ---
    // Дроп из ГРАВИЯ
	addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_aluminium', 0.10) // Рудный алюминий
    addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_titanium', 0.06) // Титан
    addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_vanadium', 0.06) // Ванадий
	addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_cobalt', 0.06)    // Рудный кобальт
	addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_magnesium', 0.06) // Рудный магний
	addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_manganese', 0.06) // Рудный марганец
	addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_cadmium', 0.06)   // Рудный кадмий
    addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_chromium', 0.04)   // Хром
    addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_mikhail', 0.04) // Рудный михал
	addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_spinel', 0.04)    // Рудная шпинель
	addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_germanium', 0.04) // Рудный германий
    addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_molybdenum', 0.06) // Рудный молибден
	addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_neodymium', 0.06) // Рудный неодим
	addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_niobium', 0.06) //  Рудный ниобий
	addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_palladium', 0.06) // Рудный палладий
	addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_polonium', 0.06) // Рудный полоний
	addTechSieve('minecraft:gravel', 'industrialupgrade:raw_metals/raw_strontium', 0.06) // Рудный стронций
	
	addTechSieve('exdeorum:crushed_end_stone', 'powah:uraninite', 0.06)
	addTechSieve('exdeorum:crushed_end_stone', 'allthemodium:allthemodium_nugget', 0.03)
	addTechSieve('exdeorum:crushed_end_stone', 'allthemodium:vibranium_nugget', 0.01)
	addTechSieve('exdeorum:crushed_end_stone', 'allthemodium:unobtainium_nugget', 0.01)
	addTechSieve('exdeorum:crushed_end_stone', 'actuallyadditions:black_quartz', 0.07)
	addTechSieve('exdeorum:crushed_end_stone', 'alltheores:fluorite', 0.06)
	addTechSieve('exdeorum:crushed_end_stone', 'forbidden_arcanus:arcane_crystal', 0.06)
	addTechSieve('exdeorum:crushed_end_stone', 'alltheores:sulfur', 0.12)
	addTechSieve('exdeorum:crushed_end_stone', 'mysticalagriculture:prosperity_shard', 0.12)
	addTechSieve('exdeorum:crushed_end_stone', 'mysticalagriculture:soulium_dust', 0.3)
	addTechSieve('exdeorum:crushed_end_stone', 'draconicevolution:draconium_dust', 0.9)
	addTechSieve('exdeorum:crushed_end_stone', 'create:ochrum', 0.7)
	addTechSieve('exdeorum:crushed_end_stone', 'create:asurine', 0.7)
	addTechSieve('exdeorum:crushed_end_stone', 'create:crimsite', 0.7)
	addTechSieve('exdeorum:crushed_end_stone', 'create:veridium', 0.7)
	addTechSieve('exdeorum:crushed_end_stone', 'xycraft_world:kivi', 0.08)
	addTechSieve('exdeorum:crushed_end_stone', 'xycraft_world:xychorium_gem_blue', 0.08)
	addTechSieve('exdeorum:crushed_end_stone', 'xycraft_world:xychorium_gem_green', 0.08)
	addTechSieve('exdeorum:crushed_end_stone', 'xycraft_world:xychorium_gem_red', 0.08)
	addTechSieve('exdeorum:crushed_end_stone', 'xycraft_world:xychorium_gem_dark', 0.08)
	addTechSieve('exdeorum:crushed_end_stone', 'xycraft_world:xychorium_gem_light', 0.08)
	addTechSieve('exdeorum:crushed_end_stone', 'alltheores:salt', 0.10)
	addTechSieve('exdeorum:crushed_end_stone', 'dragonsurvival:elder_dragon_dust', 0.03)
	addTechSieve('exdeorum:crushed_end_stone', 'moremekanismprocessing:gem_apatite', 0.03)
	
	// --- ИЗМЕЛЬЧЁННЫЙ АДСКИЙ КАМЕНЬ (Адская ветка) ---
    addTechSieve('exdeorum:crushed_netherrack', 'industrialupgrade:raw_metals/raw_barium', 0.06) // Барий
	addTechSieve('exdeorum:crushed_netherrack', 'industrialupgrade:raw_metals/raw_bismuth', 0.06) // Рудный висмут
	addTechSieve('exdeorum:crushed_netherrack', 'industrialupgrade:raw_metals/raw_gadolinium', 0.06) // Рудный гадолиний
	addTechSieve('exdeorum:crushed_netherrack', 'industrialupgrade:raw_metals/raw_yttrium', 0.06) // Рудный иттрий
	addTechSieve('exdeorum:crushed_netherrack', 'industrialupgrade:raw_metals/raw_thallium', 0.06) // Рудный таллий
	addTechSieve('exdeorum:crushed_netherrack', 'industrialupgrade:raw_metals/raw_zirconium', 0.06) // Рудный цирконий
    addTechSieve('exdeorum:crushed_netherrack', 'modern_industrialization:raw_tungsten', 0.05) // Вольфрам
	addTechSieve('exdeorum:crushed_netherrack', 'industrialupgrade:raw_metals/raw_tantalum', 0.04) // Тантал
	addTechSieve('exdeorum:crushed_netherrack', 'industrialupgrade:raw_metals/raw_arsenic', 0.04) // Мышьяк
	addTechSieve('exdeorum:crushed_netherrack', 'industrialupgrade:raw_metals/raw_gallium', 0.04) // Добавлен Галлий
	addTechSieve('exdeorum:crushed_netherrack', 'industrialupgrade:raw_metals/raw_hafnium', 0.04) // Рудный гафний

})

ServerEvents.tags('item', event => {
    // Явно указываем, что наш предмет относится к сеткам Ex Deorum
    event.add('exdeorum:sieve_meshes', 'kubejs:industrial_mesh')
})