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

Started by Invondium on Fri, 06/05/2020 - 17:12

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:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do I check if another mod is loaded? [1.15]
Fri, 06/05/2020 - 17:12

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:
  • Tracker tickets:
  • 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.