Fixed resetting of gas data in Gas-Burning Generator
This commit is contained in:
parent
16c7dc92af
commit
ba8e5e198b
1 changed files with 11 additions and 5 deletions
|
@ -82,7 +82,9 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(canOperate())
|
boolean operate = canOperate();
|
||||||
|
|
||||||
|
if(operate && getEnergy() < getMaxEnergy())
|
||||||
{
|
{
|
||||||
setActive(true);
|
setActive(true);
|
||||||
|
|
||||||
|
@ -112,8 +114,13 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH
|
||||||
burnTicks = total % maxBurnTicks;
|
burnTicks = total % maxBurnTicks;
|
||||||
clientUsed = toUse;
|
clientUsed = toUse;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
reset();
|
if(!operate)
|
||||||
|
{
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
clientUsed = 0;
|
||||||
setActive(false);
|
setActive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +132,6 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH
|
||||||
maxBurnTicks = 0;
|
maxBurnTicks = 0;
|
||||||
generationRate = 0;
|
generationRate = 0;
|
||||||
output = general.FROM_H2*2;
|
output = general.FROM_H2*2;
|
||||||
clientUsed = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getToUse()
|
public int getToUse()
|
||||||
|
@ -182,7 +188,7 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH
|
||||||
@Override
|
@Override
|
||||||
public boolean canOperate()
|
public boolean canOperate()
|
||||||
{
|
{
|
||||||
return getEnergy() < getMaxEnergy() && (fuelTank.getStored() > 0 || burnTicks > 0) && MekanismUtils.canFunction(this);
|
return (fuelTank.getStored() > 0 || burnTicks > 0) && MekanismUtils.canFunction(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue