Fix Gas Tanks filling from the wrong type of gas.
(eg. in a Chemical Injection Chamber.)
This commit is contained in:
parent
b75ff5d9a1
commit
bafdb18756
2 changed files with 2 additions and 2 deletions
|
@ -79,7 +79,7 @@ public class GasTank
|
||||||
*/
|
*/
|
||||||
public int receive(GasStack amount, boolean doReceive)
|
public int receive(GasStack amount, boolean doReceive)
|
||||||
{
|
{
|
||||||
if(amount == null || (stored != null && stored.amount == getMaxGas()))
|
if(amount == null || (stored != null && !(stored.amount != getMaxGas() && stored.isGasEqual(amount))))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,7 +145,7 @@ public abstract class TileEntityAdvancedElectricMachine<RECIPE extends AdvancedM
|
||||||
GasStack stack = getItemGas(inventory[1]);
|
GasStack stack = getItemGas(inventory[1]);
|
||||||
int gasNeeded = gasTank.getNeeded();
|
int gasNeeded = gasTank.getNeeded();
|
||||||
|
|
||||||
if(stack != null && stack.amount <= gasNeeded)
|
if(stack != null && gasTank.canReceive(stack.getGas()) && gasNeeded >= stack.amount)
|
||||||
{
|
{
|
||||||
gasTank.receive(stack, true);
|
gasTank.receive(stack, true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue