Fix factory injecting support

This commit is contained in:
Aidan Brady 2013-12-24 17:06:35 -05:00
parent fdc94550ee
commit de3b0cb208
2 changed files with 10 additions and 3 deletions

View file

@ -1,8 +1,5 @@
package mekanism.common;
import ic2.api.recipe.RecipeInputOreDict;
import ic2.api.recipe.Recipes;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;

View file

@ -349,6 +349,16 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IPerip
return;
}
}
else if(recipeType == RecipeType.INJECTING.ordinal())
{
if(inventory[4].getItem() instanceof IGasItem)
{
GasStack removed = GasTransmission.removeGas(inventory[4], GasRegistry.getGas("sulfuricAcid"), getMaxSecondaryEnergy()-secondaryEnergyStored);
setSecondaryEnergy(secondaryEnergyStored + (removed != null ? removed.amount : 0));
return;
}
}
int fuelTicks = RecipeType.values()[recipeType].getFuelTicks(inventory[4]);
int energyNeeded = getMaxSecondaryEnergy() - secondaryEnergyStored;