Fix fluid naquadah generator not consuming fuel
This commit is contained in:
parent
0c56122e35
commit
94cdcfe33c
2 changed files with 7 additions and 1 deletions
|
@ -191,7 +191,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
|
|||
} else {
|
||||
int tFuelValue = getFuelValue(mFluid), tConsumed = consumedFluidPerOperation(mFluid);
|
||||
if (tFuelValue > 0 && tConsumed > 0 && mFluid.amount > tConsumed) {
|
||||
long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);
|
||||
long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);
|
||||
if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) {
|
||||
tProducedEU = tFluidAmountToUse * tFuelValue;
|
||||
mFluid.amount -= tFluidAmountToUse * tConsumed;
|
||||
|
|
|
@ -2,6 +2,7 @@ package gregtech.common.tileentities.generators;
|
|||
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enums.ConfigCategories;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.interfaces.ITexture;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
|
@ -44,6 +45,11 @@ public class GT_MetaTileEntity_FluidNaquadahReactor
|
|||
return mEfficiency;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long maxEUStore() {
|
||||
return Math.max(getEUVar(), GT_Values.V[mTier] * 120 + getMinimumStoredEU());
|
||||
}
|
||||
|
||||
public void onConfigLoad() {
|
||||
this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "FluidNaquadah.efficiency.tier." + this.mTier, 100);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue