NaturesAura/src/main/java/de/ellpeck/naturesaura/compat/Compat.java

35 lines
973 B
Java
Raw Normal View History

2018-10-19 14:35:25 +02:00
package de.ellpeck.naturesaura.compat;
2018-11-11 16:50:51 +01:00
import de.ellpeck.naturesaura.compat.crafttweaker.CraftTweakerCompat;
import de.ellpeck.naturesaura.compat.patchouli.PatchouliCompat;
2020-01-21 21:04:44 +01:00
import net.minecraftforge.fml.ModList;
2018-10-19 14:35:25 +02:00
public final class Compat {
public static final String CRAFT_TWEAKER = "crafttweaker";
2018-10-19 14:35:25 +02:00
public static boolean baubles;
2018-11-11 16:50:51 +01:00
public static boolean craftTweaker;
2018-11-11 17:00:47 +01:00
public static boolean mtLib;
2018-10-19 14:35:25 +02:00
2018-11-11 16:50:51 +01:00
public static void preInit() {
2020-01-21 21:04:44 +01:00
ModList mods = ModList.get();
baubles = mods.isLoaded("baubles");
craftTweaker = mods.isLoaded(CRAFT_TWEAKER);
mtLib = mods.isLoaded("mtlib");
2018-11-11 16:50:51 +01:00
2020-01-21 21:04:44 +01:00
/*if (baubles)
MinecraftForge.EVENT_BUS.register(new BaublesCompat());*/
2019-01-26 00:34:05 +01:00
PatchouliCompat.preInit();
}
public static void preInitClient() {
PatchouliCompat.preInitClient();
}
2018-11-11 16:50:51 +01:00
public static void postInit() {
2018-11-11 17:00:47 +01:00
if (craftTweaker && mtLib)
2018-11-11 16:50:51 +01:00
CraftTweakerCompat.postInit();
}
2018-10-19 14:35:25 +02:00
}