Fix #209. Hardened plugin loading. IC2 machines load only with IC2

This commit is contained in:
mezz committed 2014-09-22 22:42:15 -07:00
1 parent 23ae1abb06
commit 2986536e66
16 files changed
+295 -186

No files matched your search

@@ -10,6 +10,7 @@
******************************************************************************/
package forestry.energy.gadgets;
import forestry.plugins.PluginManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
@@ -63,7 +64,8 @@ public class EngineTin extends Engine implements ISocketable, IInventory {
super(Defaults.ENGINE_TIN_HEAT_MAX, 10000, 400);
setHints(Config.hints.get("engine.tin"));
if (PluginIC2.instance.isAvailable()) ic2EnergySink = new BasicSink(this, euConfig.euStorage, 3);
if (PluginManager.isModuleLoaded(PluginIC2.class))
ic2EnergySink = new BasicSink(this, euConfig.euStorage, 3);
}
@Override