Fix advanced-recipe factories not using gas at first

This commit is contained in:
Ben Spiers committed 2015-03-22 13:07:25 +00:00
1 parent d061792f3e
commit 050f3351e2
1 file changed
+4 -2
@@ -299,9 +299,11 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
if(tileEntity instanceof TileEntityFactory)
{
TileEntityFactory factory = (TileEntityFactory)tileEntity;
RecipeType recipeType = RecipeType.values()[getRecipeType(stack)];
((TileEntityFactory)tileEntity).recipeType = recipeType;
((TileEntityFactory)tileEntity).upgradeComponent.setSupported(Upgrade.GAS, recipeType.fuelEnergyUpgrades());
factory.recipeType = recipeType;
factory.upgradeComponent.setSupported(Upgrade.GAS, recipeType.fuelEnergyUpgrades());
factory.secondaryEnergyPerTick = factory.getSecondaryEnergyPerTick(recipeType);
world.notifyBlocksOfNeighborChange(x, y, z, tileEntity.getBlockType());
}