diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-09-23 11:19:01 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-09-23 11:19:01 +1000 |
commit | 48b5bed437d6517af87856f84259a2efda81c371 (patch) | |
tree | 5afd22dab52d74ffdf89794ad884e3d3dcbadf0e /src/Java/gtPlusPlus/xmod/gregtech/api | |
parent | 378ddec805d28721f0bb0bab59804dc816105921 (diff) | |
parent | d25675f4dbf81607e2960464d9e302c4ef8ca46e (diff) | |
download | GT5-Unofficial-48b5bed437d6517af87856f84259a2efda81c371.tar.gz GT5-Unofficial-48b5bed437d6517af87856f84259a2efda81c371.tar.bz2 GT5-Unofficial-48b5bed437d6517af87856f84259a2efda81c371.zip |
On NewMatSystem: Winging It.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java index ec75e82114..ce4042148e 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java @@ -18,6 +18,9 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_BasicTank { + + private boolean useFuel = false; + public GregtechRocketFuelGeneratorBase(int aID, String aName, String aNameRegional, int aTier, String aDescription, ITexture... aTextures) { super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); } @@ -193,8 +196,15 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ 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); - if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) - mFluid.amount -= tFluidAmountToUse * tConsumed; + if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)){ + if (useFuel){ + mFluid.amount -= tFluidAmountToUse * tConsumed; + useFuel = false; + } + else { + useFuel = true; + } + } } } if (mInventory[getInputSlot()] != null && aBaseMetaTileEntity.getUniversalEnergyStored() < (maxEUOutput() * 20 + getMinimumStoredEU()) && GT_Utility.getFluidForFilledItem(mInventory[getInputSlot()], true) == null) { |