ServerEvents.recipes(event => {
    const toRemove = [
        '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'
    ];
    toRemove.forEach(id => event.remove({ id: id }));

    const itemsToPurge = [
        'naturalist:reptile_hide', 
        'earlystage:heating_stones'
    ];
    itemsToPurge.forEach(item => {
        event.remove({ output: item });
        event.replaceInput({}, item, 'minecraft:air');
    });

    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' 
        });
    });

    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);
        });
    });
});