ServerEvents.recipes(event => {
    // 1. Bulk Removal by ID
    const recipesToRemove = [
        'naturalist:leather_from_reptile_hide', 
        'tiered:limestone_create',
        'tiered:limestone_to_create_limestone', 
        'tierify_ores:limestone_create',
        'earlystage:heating_stones_from_rock', 
        'incendium:upgrade_elytra',
        'minecraft:bread', 
        'forcemaster_rpg:golden_knuckle'
    ];
    
    recipesToRemove.forEach(id => {
        event.remove({ id: id });
    });

    // 2. Item Purging & Inputs
    event.remove({ output: 'naturalist:reptile_hide' });
    event.replaceInput({ input: 'naturalist:reptile_hide' }, 'naturalist:reptile_hide', 'minecraft:leather');
    
    event.remove({ output: 'earlystage:heating_stones' });
    event.replaceInput({ input: 'earlystage:heating_stones' }, 'earlystage:heating_stones', 'minecraft:cobblestone');

    // 3. Horse Armor
    const horseTiers = [
        { id: 'minecraft:iron_horse_armor', mat: 'minecraft:iron_ingot' },
        { id: 'minecraft:golden_horse_armor', mat: 'minecraft:gold_ingot' },
        { id: 'minecraft:diamond_horse_armor', mat: 'minecraft:diamond' },
        { id: 'minecraft:leather_horse_armor', mat: 'minecraft:leather' }
    ];
    
    horseTiers.forEach(tier => {
        event.remove({ output: tier.id });
        event.shaped(tier.id, ['  M', 'MWM', 'M M'], { M: tier.mat, W: 'minecraft:white_wool' });
    });

    // 4. Knight Set Smithing
    const knightSets = [
        { stone: 'death_knights:blood_stone', output: 'death_knights:crimson_guard_armor' },
        { stone: 'death_knights:unholy_stone', output: 'death_knights:plaguebringer_armor' },
        { stone: 'runes:frost_stone', output: 'death_knights:frozen_champion_armor' }
    ];
    
    knightSets.forEach(set => {
        ['head', 'chest', 'legs', 'feet'].forEach(piece => {
            let res = `${set.output}_${piece}`;
            let base = `death_knights:initiate_armor_${piece}`;
            event.smithing(res, 'minecraft:iron_block', base, set.stone);
        });
    });
});