aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/GT_Mod.java
diff options
context:
space:
mode:
authorDream-Master <dream-master@gmx.net>2016-03-20 12:59:15 +0100
committerDream-Master <dream-master@gmx.net>2016-03-20 12:59:43 +0100
commit32f416a2e651f90e374a6b801c3b3ccc49fb4584 (patch)
tree64868ff41a3028989e4288b248c680308c0d867a /src/main/java/gregtech/GT_Mod.java
parent7c3fdb2ebc32e6042f588866b942a625dfef7556 (diff)
downloadGT5-Unofficial-32f416a2e651f90e374a6b801c3b3ccc49fb4584.tar.gz
GT5-Unofficial-32f416a2e651f90e374a6b801c3b3ccc49fb4584.tar.bz2
GT5-Unofficial-32f416a2e651f90e374a6b801c3b3ccc49fb4584.zip
Adding Forestry 4 support
Diffstat (limited to 'src/main/java/gregtech/GT_Mod.java')
-rw-r--r--src/main/java/gregtech/GT_Mod.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index a142a7c26c..2432ff884f 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -3,9 +3,9 @@ package gregtech;
import cpw.mods.fml.common.*;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.registry.EntityRegistry;
-import forestry.factory.gadgets.MachineCentrifuge;
-import forestry.factory.gadgets.MachineCentrifuge.RecipeManager;
-import forestry.factory.gadgets.MachineSqueezer;
+import forestry.api.recipes.ICentrifugeRecipe;
+import forestry.api.recipes.ISqueezerRecipe;
+import forestry.api.recipes.RecipeManagers;
import gregtech.api.GregTech_API;
import gregtech.api.enchants.Enchantment_EnderDamage;
import gregtech.api.enchants.Enchantment_Radioactivity;
@@ -472,10 +472,8 @@ public class GT_Mod
}
}
try {
- for (Object tRecipe : MachineCentrifuge.RecipeManager.recipes)
- {
- Map<ItemStack,Float> outputs = ((MachineCentrifuge.CentrifugeRecipe)tRecipe).getAllProducts();
-
+ for (ICentrifugeRecipe tRecipe : RecipeManagers.centrifugeManager.recipes()) {
+ Map<ItemStack, Float> outputs = tRecipe.getAllProducts();
ItemStack[] tOutputs = new ItemStack[outputs.size()];
int[] tChances = new int[outputs.size()];
int i =0;
@@ -488,7 +486,7 @@ public class GT_Mod
// tOutputs[i] = outputs.entrySet().
// tChances[i] = (tOriginalChances[i].intValue() * 100);
// }
- GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(true, new ItemStack[] { ((MachineCentrifuge.CentrifugeRecipe)tRecipe).getInput() }, tOutputs, null, tChances, null, null, 128, 5, 0);
+ GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(true, new ItemStack[]{tRecipe.getInput()}, tOutputs, null, tChances, null, null, 128, 5, 0);
}
} catch (Throwable e) {
@@ -497,9 +495,9 @@ public class GT_Mod
}
}
try {
- for (Object tRecipe : MachineSqueezer.RecipeManager.recipes) {
- if ((((MachineSqueezer.Recipe)tRecipe).resources.length == 1) && (GT_Utility.getFluidForFilledItem(((MachineSqueezer.Recipe)tRecipe).resources[0], true) == null)) {
- GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe(true, new ItemStack[] { ((MachineSqueezer.Recipe)tRecipe).resources[0] }, new ItemStack[] { ((MachineSqueezer.Recipe)tRecipe).remnants }, null, new int[] { ((MachineSqueezer.Recipe)tRecipe).chance * 100 }, null, new FluidStack[] { ((MachineSqueezer.Recipe)tRecipe).liquid }, 400, 2, 0);
+ for (ISqueezerRecipe tRecipe : RecipeManagers.squeezerManager.recipes()) {
+ if ((tRecipe.getResources().length == 1) && (tRecipe.getFluidOutput() != null)) {
+ GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe(true, new ItemStack[]{tRecipe.getResources()[0]}, new ItemStack[]{tRecipe.getRemnants()}, null, new int[]{(int) (tRecipe.getRemnantsChance() * 10000)}, null, new FluidStack[]{tRecipe.getFluidOutput()}, 400, 2, 0);
}
}
} catch (Throwable e) {