var allMods = ModListUtils.getCurrentModList(true);
var mods = allMods.stream().toMap(m -> m.modId, m -> m);

var m_essential = mods.get("essential");
if (m_essential != null) {
    var warn = Startup.addCrashWarning("The Essential mod(<strong>" + m_essential.jarName + "</strong>) is completely incompatible with all of our modpacks, and there's no reason to use it.\nAll of our modpacks already come with built-in, free world hosting, by clicking the <strong>Share World</strong> button in the <strong>Open to LAN</strong> menu. If you are ever playing a modpack not made by Lunapixel, you can use mods such as e4mc or World Host to host your world instead of Essential, as Essential has many issues.");
    warn.withModActions(m_essential);
    Startup.markForCrash();
}

var m_essential_container = mods.get("essential-container");
if (m_essential_container != null) {
    var warn = Startup.addCrashWarning("The Essential mod(<strong>" + m_essential_container.jarName + "</strong>) is completely incompatible with all of our modpacks, and there's no reason to use it.\nAll of our modpacks already come with built-in, free world hosting, by clicking the <strong>Share World</strong> button in the <strong>Open to LAN</strong> menu. If you are ever playing a modpack not made by Lunapixel, you can use mods such as e4mc or World Host to host your world instead of Essential, as Essential has many issues.");
    warn.withModActions(m_essential_container);
    Startup.markForCrash();
}

var m_e4mc_minecraft = mods.get("e4mc_minecraft");
if (m_e4mc_minecraft != null) {
    var warn = Startup.addCrashWarning("e4mc is not needed, as all of our modpacks already has our custom fork of the e4mc mod included. If you are having issues with our own world sharing, hosting a server on your own PC via the serverpack is easy. You can learn more here: https://github.com/chorbintime/LPS-readme/wiki");
    warn.withModActions(m_e4mc_minecraft);
    Startup.markForCrash();
}

var m_tlskincape = mods.get("tlskincape");
if (m_tlskincape != null) {
    var warn = Startup.addCrashWarning("It appears that you are using TLauncher, a launcher known to be infected with spyware that can steal your passwords and monitor your computer activity. TLauncher also does not install modpacks correctly, which results in many missing files that will potentially break the modpack. It is heavily encouraged to delete all traces of TLauncher off of your computer, do an antivirus scan, and buy Minecraft so you can use a better launcher, such as https://atlauncher.com/downloads.");
    warn.withModActions(m_tlskincape);
    Startup.markForCrash();
}

