2013-05-23 21:07:28 -07:00
|
|
|
package magicbees.main.utils.compat;
|
2013-04-11 02:40:25 -07:00
|
|
|
|
2013-05-23 21:07:28 -07:00
|
|
|
import magicbees.main.Config;
|
2013-04-11 02:40:25 -07:00
|
|
|
import net.minecraft.item.Item;
|
2013-04-11 23:08:17 -07:00
|
|
|
import cpw.mods.fml.common.FMLLog;
|
|
|
|
|
import cpw.mods.fml.common.Loader;
|
2013-04-11 02:40:25 -07:00
|
|
|
|
|
|
|
|
public class EquivalentExchangeHelper
|
|
|
|
|
{
|
|
|
|
|
private static boolean isEquivalentExchangePresent = false;
|
|
|
|
|
|
|
|
|
|
public static boolean isActive()
|
|
|
|
|
{
|
|
|
|
|
return isEquivalentExchangePresent;
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-09 23:23:00 -07:00
|
|
|
public static void preInit()
|
2013-04-11 02:40:25 -07:00
|
|
|
{
|
2013-04-11 23:08:17 -07:00
|
|
|
if (Loader.isModLoaded("EE3"))
|
2013-04-11 02:40:25 -07:00
|
|
|
{
|
|
|
|
|
isEquivalentExchangePresent = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-09 23:23:00 -07:00
|
|
|
public static void init()
|
2013-04-11 02:40:25 -07:00
|
|
|
{
|
|
|
|
|
if (isActive())
|
|
|
|
|
{
|
2013-09-09 23:23:00 -07:00
|
|
|
getBlocks();
|
|
|
|
|
getItems();
|
2013-04-11 02:40:25 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-09 23:23:00 -07:00
|
|
|
public static void postInit() {}
|
|
|
|
|
|
|
|
|
|
private static void getBlocks() {}
|
|
|
|
|
|
|
|
|
|
private static void getItems()
|
2013-04-11 02:40:25 -07:00
|
|
|
{
|
2013-09-09 23:23:00 -07:00
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
Class itemClass = Class.forName("com.pahimar.ee3.item.ModItems");
|
|
|
|
|
Config.eeMinuimShard = (Item)(itemClass.getField("miniumShard").get(null));
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
2013-04-11 02:40:25 -07:00
|
|
|
{
|
2013-09-09 23:23:00 -07:00
|
|
|
FMLLog.info("Could not get Equivalent Exchange items.");
|
2013-04-11 02:40:25 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|