Fix Gas Tanks filling from the wrong type of gas.

(eg. in a Chemical Injection Chamber.)
This commit is contained in:
Ben Spiers committed 2014-09-07 00:15:00 +01:00
1 parent b75ff5d9a1
commit bafdb18756
2 files changed
+2 -2

No files matched your search

@@ -145,7 +145,7 @@ public abstract class TileEntityAdvancedElectricMachine<RECIPE extends AdvancedM
GasStack stack = getItemGas(inventory[1]);
int gasNeeded = gasTank.getNeeded();
if(stack != null && stack.amount <= gasNeeded)
if(stack != null && gasTank.canReceive(stack.getGas()) && gasNeeded >= stack.amount)
{
gasTank.receive(stack, true);