How do you make your mod do something if it detects another active mod?

Started by DaRealHerobrine on

Topic category: Advanced modding

Active 1 day ago
Joined Jul 2020
Points:
828

User statistics:

  • Modifications: 1
  • Forum topics: 33
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 71
How do you make your mod do something if it detects another active mod?

So, my mod adds Nether Iron Ore, but I want it to be disabled if the Charm mod is active, as that adds Pig Iron Ore. How would I go about doing this? I know this is possible, as Charm does it for Quark.

Active 4 months ago
Joined Apr 2018
Points:
751

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 125
You will need to do custom…
Sun, 02/21/2021 - 23:01

You will need to do custom coding. Basically you will need to create additional generation condition and if statement inside that checks ModList.get().isLoaded(“modid”);.