// 1. Zenith & Weapon Tags
ServerEvents.tags('item', event => {
    const meleeMods = [
        '/wizards:.*/', 
        '/elemental_wizards_rpg:.*/', 
        '/paladins:.*/', 
        '/rogues:.*/', 
        '/berserker_rpg:.*/', 
        '/forcemaster_rpg:.*/', 
        '/death_knights:.*/'
    ];
    const rangedMods = ['/archers:.*/'];

    event.add('c:swords', meleeMods);
    event.add('c:weapons/melee', meleeMods);
    event.add('c:weapons/ranged', rangedMods);
    
    event.add('zenith:affix_heavy_weapons', [
        '/paladins:.*hammer/', 
        '/paladins:.*claymore/', 
        '/death_knights:.*greatsword/'
    ]);
    
    // NOTE: We have REMOVED the line that adds it to 'c:hidden_from_recipe_viewers'
    // This ensures the table and its recipes show up in EMI.
})

// 2. Interaction Restrictions
BlockEvents.rightClicked('minecraft:enchanting_table', event => {
    // This keeps the table unusable as a workstation
    event.cancel();
    
    // Feedback for the player (Optional but recommended for UX)
    event.player.displayClientMessage(Text.gold("The table's ancient magic is dormant; it serves only as a material for higher crafts."), true);
})