Fix #1348 support for IC2 in 1.10.2

This commit is contained in:
mezz committed 2016-07-10 18:43:58 -07:00
1 parent cd10500a17
commit 523a8da908
4 files changed
+21 -18

No files matched your search

+3 -1
View File
@@ -12,6 +12,7 @@ package forestry;
import java.io.File;
import forestry.plugins.compat.PluginIC2;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.common.Mod;
@@ -51,7 +52,8 @@ import forestry.plugins.PluginManager;
guiFactory = "forestry.core.config.ForestryGuiConfigFactory",
acceptedMinecraftVersions = "[1.10]",
dependencies = "required-after:Forge@[12.18.0.1989,);"
+ "after:JEI@[3.7.0,);")
+ "after:JEI@[3.7.0,);"
+ "after:" + PluginIC2.modId + ";")
public class Forestry {
@Mod.Instance(Constants.MOD_ID)
@@ -38,7 +38,7 @@ public class FarmLogicRubber extends FarmLogic {
public FarmLogicRubber() {
if (PluginIC2.rubberWood == null || PluginIC2.resin == null) {
Log.warning("Failed to init a farm logic %s since IC2 was not found", getClass().getName());
Log.warning("Failed to init a farm logic {} since IC2 rubber wood or resin were not found", getClass().getName());
active = false;
}
}
@@ -141,8 +141,8 @@ public class PluginIC2 extends BlankForestryPlugin {
Circuit.energyElectricBoost1 = new CircuitElectricBoost("electric.boost.1", 2, 7, 20);
Circuit.energyElectricBoost2 = new CircuitElectricBoost("electric.boost.2", 2, 15, 40);
blocks.electricalEngine.init();
blocks.generator.init();
blocks.electricalEngine.init();
blocks.generator.init();
}
@Override
@@ -154,19 +154,20 @@ public class PluginIC2 extends BlankForestryPlugin {
}
IBackpackDefinition forester = BackpackManager.backpackInterface.getBackpack(BackpackManager.FORESTER_UID);
if (resin != null) {
forester.addValidItem(resin);
}
if (rubber != null) {
forester.addValidItem(rubber);
}
if (rubberSapling != null) {
forester.addValidItem(rubberSapling);
}
ItemStack rubberLeaves = IC2Items.getItem("leaves");
if (rubberLeaves != null) {
forester.addValidItem(rubberLeaves);
if (forester != null) {
if (resin != null) {
forester.addValidItem(resin);
}
if (rubber != null) {
forester.addValidItem(rubber);
}
if (rubberSapling != null) {
forester.addValidItem(rubberSapling);
}
ItemStack rubberLeaves = IC2Items.getItem("leaves");
if (rubberLeaves != null) {
forester.addValidItem(rubberLeaves);
}
}
}