update to forestry 4.0
This commit is contained in:
parent
efb34b3274
commit
70c116c3df
1 changed files with 24 additions and 27 deletions
|
@ -15,9 +15,12 @@ import cpw.mods.fml.common.event.FMLServerStartedEvent;
|
|||
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
|
||||
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.factory.recipes.ISqueezerRecipe;
|
||||
import forestry.factory.tiles.TileCentrifuge;
|
||||
import forestry.factory.tiles.TileSqueezer;
|
||||
//import forestry.factory.gadgets.MachineCentrifuge;
|
||||
//import forestry.factory.gadgets.MachineCentrifuge.RecipeManager;
|
||||
//import forestry.factory.gadgets.MachineSqueezer;
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enchants.Enchantment_EnderDamage;
|
||||
import gregtech.api.enchants.Enchantment_Radioactivity;
|
||||
|
@ -564,11 +567,9 @@ public class GT_Mod
|
|||
}
|
||||
try
|
||||
{
|
||||
for (Object tRecipe : MachineCentrifuge.RecipeManager.recipes)
|
||||
for (Object tRecipe : TileCentrifuge.RecipeManager.recipes)
|
||||
{
|
||||
|
||||
|
||||
Map<ItemStack,Float> outputs = ((MachineCentrifuge.CentrifugeRecipe)tRecipe).getAllProducts();
|
||||
Map<ItemStack,Float> outputs = ((TileCentrifuge.CentrifugeRecipe)tRecipe).getAllProducts();
|
||||
ItemStack[] tOutputs = new ItemStack[outputs.size()];
|
||||
int[] tChances = new int[outputs.size()];
|
||||
int i =0;
|
||||
|
@ -577,11 +578,7 @@ for (Map.Entry<ItemStack, Float> entry : outputs.entrySet()) {
|
|||
tOutputs[i] = entry.getKey().copy();
|
||||
i++;
|
||||
}
|
||||
// for (int i = 0; i < outputs.size(); i++) {
|
||||
// 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[] { ((TileCentrifuge.CentrifugeRecipe)tRecipe).getInput() }, tOutputs, null, tChances, null, null, 128, 5, 0);
|
||||
}
|
||||
}
|
||||
catch (Throwable e)
|
||||
|
@ -592,9 +589,9 @@ for (Map.Entry<ItemStack, Float> entry : outputs.entrySet()) {
|
|||
}
|
||||
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 (Object tRecipe : TileSqueezer.RecipeManager.recipes) {
|
||||
if ((((ISqueezerRecipe)tRecipe).getResources().length == 1) && (((ISqueezerRecipe)tRecipe).getFluidOutput() != null)) {
|
||||
GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe(true, new ItemStack[] { ((ISqueezerRecipe)tRecipe).getResources()[0] }, new ItemStack[] { ((ISqueezerRecipe)tRecipe).getRemnants() }, null, new int[] { (int) (((ISqueezerRecipe)tRecipe).getRemnantsChance() * 10000) }, null, new FluidStack[] { ((ISqueezerRecipe)tRecipe).getFluidOutput() }, 400, 2, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue