ItemEvents.modifyTooltips((event) => {
    // https://kubejs.com/wiki/events/ItemEvents/modifyTooltips
    /*
    Valid Color Codes:
    
    .black()
    .darkBlue()
    .darkGreen()
    .darkAqua()
    .darkRed()
    .darkPurple()
    .gold()
    .gray()
    .darkGray()
    .blue()
    .green()
    .aqua()
    .red()
    .lightPurple()
    .yellow()
    .white()
    .color('#808080') //any hex color
    */
    const recipes = [
        {
            items: [
                'minecraft:reinforced_deepslate',
                'modularrouters:blast_upgrade',
                'enderio:reinforced_obsidian_block'
            ],
            text: [Text.of('Wither Immune').lightPurple()]
        },
        {
            items: [
                'naturesaura:animal_generator',
                'naturesaura:projectile_generator',
                'naturesaura:chorus_generator',
                'naturesaura:oak_generator',
                'naturesaura:slime_split_generator',
                'naturesaura:firework_generator',
                'naturesaura:moss_generator',
                'naturesaura:flower_generator',
                'naturesaura:potion_generator'
            ],
            text: [Text.of(`Aura Generator`).green()]
        },
        {
            items: ['naturesaura:effect_powder[naturesaura:effect_powder_data={effect:"naturesaura:plant_boost"}]'],
            text: [Text.of(`Inhibits boosted plant growth from Aura`).green()]
        },
        {
            items: ['naturesaura:effect_powder[naturesaura:effect_powder_data={effect:"naturesaura:nether_grass"}]'],
            text: [Text.of(`Inhibits Aura induced grass growth in the Nether`).green()]
        },
        {
            items: ['naturesaura:effect_powder[naturesaura:effect_powder_data={effect:"naturesaura:cache_recharge"}]'],
            text: [Text.of(`Inhibits Aura from charging a worn Aura Cache or Aura Trove`).green()]
        },
        {
            items: ['naturesaura:effect_powder[naturesaura:effect_powder_data={effect:"naturesaura:ore_spawn"}]'],
            text: [Text.of(`Converts stone to random ores with Aura`).green()]
        },
        {
            items: ['naturesaura:effect_powder[naturesaura:effect_powder_data={effect:"naturesaura:animal"}]'],
            text: [Text.of(`Induces animals to breed in areas with high Aura`).green()]
        },
        {
            items: ['naturesaura:break_prevention'],
            text: [Text.of(`Prevents using a tool if it would break on the next use`).green()]
        },
        {
            items: ['naturesaura:snow_creator'],
            text: [Text.of(`Snow and Ice Maker`).green()]
        },
        {
            items: ['naturesaura:light_staff', 'ars_nouveau:jar_of_light'],
            text: [Text.of(`Creates Light Sources`).gold()]
        },
        {
            items: ['naturesaura:cave_finder'],
            text: [Text.of(`Highlights Nearby Dark Areas`).gold()]
        },
        {
            items: ['naturesaura:loot_finder'],
            text: [Text.of(`Highlights Nearby Inventories`).gold()]
        },
        {
            items: ['naturesaura:netherite_finder'],
            text: [Text.of(`Highlights Nearby Netherite`).gold()]
        },
        {
            items: ['naturesaura:death_ring'],
            text: [Text.of(`Prevents Death`).gold()]
        },
        {
            items: ['naturesaura:shockwave_creator'],
            text: [Text.of(`Knocks Foes Back`).gold()]
        },
        {
            items: [
                'naturesaura:aura_timer',
                'malum:wavemaker',
                'utilitarian:redstone_clock',
                'ars_nouveau:timer_spell_turret',
                'create:pulse_timer'
            ],
            text: [Text.of(`Redstone Timer`).green()]
        },
        {
            items: ['naturesaura:animal_container'],
            text: [Text.of(`Invisible Fence`).green()]
        },
        {
            items: ['naturesaura:field_creator'],
            text: [Text.of(`Block Breaker`).green()]
        },
        {
            items: ['naturesaura:placer'],
            text: [Text.of(`Block Placer`).green()]
        },
        {
            items: ['naturesaura:grated_chute'],
            text: [Text.of(`Filtered Hopper`).green()]
        },
        {
            items: ['naturesaura:hopper_upgrade'],
            text: [Text.of(`Item Collector`).green()]
        },
        {
            items: ['naturesaura:spawn_lamp', 'ars_nouveau:ritual_sanctuary'],
            text: [Text.of(`Prevents Mob Spawns`).green()]
        },
        {
            items: ['naturesaura:rf_converter'],
            text: [Text.of(`Generates FE From Aura`).red()]
        },
        {
            items: ['naturesaura:lower_limiter'],
            text: [Text.of(`Prevents Negative Aura Drain`).green()]
        },
        {
            items: ['naturesaura:spring', 'ars_elemental:everfull_urn'],
            text: [Text.of(`Endless Water Source`).green()]
        },
        {
            items: ['naturesaura:aura_detector'],
            text: [Text.of(`Detects Aura Levels`).green()]
        },
        {
            items: ['naturesaura:pickup_stopper'],
            text: [Text.of(`Anti-Magnet`).green()]
        },
        {
            items: ['naturesaura:weather_changer'],
            text: [Text.of(`Weather Manipulator`).green()]
        },
        {
            items: ['naturesaura:time_changer'],
            text: [Text.of(`Time Manipulator`).green()]
        },
        {
            items: ['naturesaura:furnace_heater'],
            text: [Text.of(`Aura Powered Furnace`).green()]
        },
        {
            items: ['naturesaura:blast_furnace_booster'],
            text: [Text.of(`Ore Processing`).green()]
        },
        {
            items: ['naturesaura:range_visualizer'],
            text: [Text.of(`Arcane Instrument: Visualizes Apparatus Effect Area`).green()]
        },
        {
            items: [
                'naturesaura:ender_crate',
                'naturesaura:ender_access',
                'minecraft:ender_chest',
                'functionalstorage:ender_drawer',
                'occultism:stable_wormhole',
                'occultism:storage_controller',
                'occultism:storage_remote',
                'enderstorage:ender_pouch',
                'enderstorage:ender_chest',
                'enderstorage:ender_tank'
            ],
            text: [Text.of(`Cross-Dimensional Storage`).darkPurple()]
        },
        {
            items: [
                'ae2:quantum_link',
                'ae2:quantum_ring',
                'laserio:laser_connector_advanced',
                'modularrouters:sender_module_3'
            ],
            text: [Text.of(`Cross-Dimensional Logistics`).darkPurple()]
        },
        {
            items: ['ars_nouveau:enchanters_mirror'],
            text: [Text.of(`Arcane Focus: Self`).gold()]
        },
        {
            items: ['ars_elemental:spell_horn'],
            text: [Text.of(`Arcane Focus: Area`).gold()]
        },
        {
            items: ['ars_nouveau:wand'],
            text: [Text.of(`Arcane Focus: Projectile`).gold()]
        },
        {
            items: ['ars_nouveau:enchanters_sword'],
            text: [Text.of(`Arcane Focus: Touch`).gold()]
        },
        {
            items: ['ars_nouveau:enchanters_shield'],
            text: [Text.of(`Arcane Instrument: Blocked Attacks Boost Spell Damage and Mana Regen`).lightPurple()]
        },
        {
            items: ['ars_nouveau:splash_flask_cannon'],
            text: [Text.of(`Arcane Instrument: Converts Potions to Splash Potions`).lightPurple()]
        },
        {
            items: ['ars_nouveau:lingering_flask_cannon'],
            text: [Text.of(`Arcane Instrument: Converts Potions to Lingering Potions`).lightPurple()]
        },
        {
            items: ['ars_nouveau:void_jar'],
            text: [Text.of(`Arcane Instrument: Converts Items to Source`).lightPurple()]
        },
        {
            items: ['ars_nouveau:potion_diffuser'],
            text: [Text.of(`Applies Potions in the Area`).lightPurple()]
        },
        {
            items: ['ars_nouveau:belt_of_levitation'],
            text: [Text.of(`Arcane Instrument: Allows the Wearer to Hover`).lightPurple()]
        },
        {
            items: ['ars_nouveau:belt_of_unstable_gifts'],
            text: [Text.of(`Arcane Instrument: Grants Random Potion Effects`).lightPurple()]
        },
        {
            items: ['ars_nouveau:ring_of_lesser_discount', 'ars_nouveau:ring_of_greater_discount'],
            text: [Text.of(`Arcane Instrument: Reduces Spell Cost`).lightPurple()]
        },
        {
            items: ['ars_nouveau:amulet_of_mana_boost'],
            text: [Text.of(`Arcane Instrument: Increases Personal Mana Pool`).lightPurple()]
        },
        {
            items: ['ars_nouveau:amulet_of_mana_regen'],
            text: [Text.of(`Arcane Instrument: Increases Personal Mana Regen Rate`).lightPurple()]
        },
        {
            items: [
                'ars_nouveau:wixie_cauldron',
                'ars_nouveau:wixie_charm',
                'enderio:crafter',
                'ae2:molecular_assembler',
                'minecraft:crafter'
            ],
            text: [Text.of(`Auto-crafter`).green()]
        },
        {
            items: ['functionalstorage:armory_cabinet'],
            text: [Text.of(`Bulk Unstackable Storage`).green()]
        },
        {
            items: ['occultism:chalk_void', 'occultism:chalk_rainbow'],
            text: [Text.of(`May replace any Chalk in any pentacle`).gold()]
        },
        {
            items: Object.keys(armor_insulation),
            text: [Text.of(`May be used to insulate armor`).gold()]
        },
        {
            items: ['supplementaries:fodder'],
            text: [Text.of(`Feeds animals and induces them to breed`).green()]
        },
        {
            items: ['minecraft:torchflower', 'ars_elemental:spore_blossom_up'],
            text: [Text.of(`Found on Flourishing Islands`).gold()]
        },
        {
            items: ['minecraft:allium', 'minecraft:pitcher_plant'],
            text: [Text.of(`Found on Cascading Islands`).gold()]
        },
        {
            items: ['aether:white_flower', 'aether:purple_flower'],
            text: [Text.of(`Found on Platform Islands`).gold()]
        },
        {
            items: ['minecraft:pink_petals'],
            text: [Text.of(`Found on Flashing Islands`).gold()]
        },
        {
            items: ['malum:strange_crystal', 'malum:large_strange_crystal'],
            text: [Text.of(`Found on Vexing Islands`).gold()]
        },
        {
            items: ['malum:void_depot'],
            text: [Text.of(`The Weeping Well is located on the Vexing Island`).gold()]
        },
        {
            items: ['#enigmatica:chilled'],
            text: [Text.of(`Cool to the Touch`).aqua()]
        },
        {
            items: ['#enigmatica:cold'],
            text: [Text.of(`Cold to the Touch`).aqua()]
        },
        {
            items: ['#enigmatica:super_cold'],
            text: [Text.of(`Freezing to the Touch`).aqua()]
        },
        {
            items: ['#enigmatica:warm'],
            text: [Text.of(`Warm to the Touch`).red()]
        },
        {
            items: ['#enigmatica:hot'],
            text: [Text.of(`Hot to the Touch`).red()]
        },
        {
            items: ['#enigmatica:super_hot'],
            text: [Text.of(`Burning to the Touch`).red()]
        }
    ];

    recipes.forEach((recipe) => {
        event.add(recipe.items, recipe.text);
    });

    emi.items.disabled.forEach((item) => {
        event.add(item, [Text.of(disabled_item_tooltip).red()]);
    });
});
