How do I check if another mod is loaded? [1.15]

Started by Invondium on

Topic category: Help with modding (Java Edition)

Last seen on 21:25, 5. Jun 2020
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I check if another mod is loaded? [1.15]

Hi,

I am trying to check if another mod is active/loaded in game, though still have the mod work without the other one. I could do this with custom code and just setting a global variable after all the mods are loaded, and do the rest of the coding using procedures. I have found numerous answers 1.12, 1.7 and 1.13, but not for 1.15.

Thanks

Last seen on 21:25, 5. Jun 2020
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I understand that you can…
Fri, 06/05/2020 - 19:58

I understand that you can set dependencies, but I would like to execute a certain procedure if another mod is loaded, so that it works with and without the mod, but loading the other mod changes the behaviour of my mod.

I would love to know that…
Sun, 06/27/2021 - 18:08

I would love to know that too, so bump for that topic.
Sadly it's really old, but maybe it will help! ^^ it can be extremely useful with some integrations

Last seen on 23:21, 17. Jun 2022
Joined Apr 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ModList.get().isLoaded(…
Sun, 06/27/2021 - 19:18
ModList.get().isLoaded("modid of mod");

Write this in custom code snippet. It's a boolean

Last seen on 23:44, 30. Jul 2023
Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Did this code snippet work…
Sat, 01/07/2023 - 15:41

Did this code snippet work for anyone in their trials? Just curious..

ModList.get().isLoaded("modid of mod");