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

36 lines
1 KiB
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;
2018-10-19 14:35:25 +02:00
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
2018-10-19 14:35:25 +02:00
public final class Compat {
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() {
2018-10-19 14:35:25 +02:00
baubles = Loader.isModLoaded("baubles");
2018-11-11 16:50:51 +01:00
craftTweaker = Loader.isModLoaded("crafttweaker");
2018-11-11 17:00:47 +01:00
mtLib = Loader.isModLoaded("mtlib");
2018-11-11 16:50:51 +01:00
if (baubles)
2018-10-19 14:35:25 +02:00
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
}