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

Started by Invondium on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 years ago
Joined May 2020
Points:
618

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
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

Active 4 years ago
Joined May 2020
Points:
618

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
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

Active 1 month ago
Joined Apr 2018
Points:
746

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 125
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

Active 1 day ago
Joined Dec 2016
Points:
755

User statistics:

  • Modifications: 1
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 31
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");