From e6ecfb3505e79fab5e0dfa7e597d6efc30de5b14 Mon Sep 17 00:00:00 2001 From: botn365 <42187820+botn365@users.noreply.github.com> Date: Mon, 30 Dec 2019 18:26:48 +0100 Subject: fix space for fluid detection --- .../implementations/base/GregtechMeta_MultiBlockBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 4a6cad20c3..53068c68a1 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -770,7 +770,7 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult // We have Fluid Stacks we did not merge. Do we have space? if (aOutputFluids.size() > 0) { // Not enough space to add fluids. - if (aOutputFluids.size() < aEmptyFluidHatches) { + if (aOutputFluids.size() > aEmptyFluidHatches) { Logger.INFO("Failed to find enough space for all fluid outputs."); return false; } -- cgit From fbb298251275388777a7ff30d8b9f0fd0c88f39c Mon Sep 17 00:00:00 2001 From: botn365 <42187820+botn365@users.noreply.github.com> Date: Wed, 8 Jan 2020 00:14:32 +0100 Subject: Redone Turbodyne F1-A Logic (#597) - Removed free fuel tick on single block rocket engines. % Changed hg1223 from ZPM to LuV. % Spelling. % Adjusted logging. $ Rewrote large rocket engine logic. Co-authored-by: Alkalus <3060479+draknyte1@users.noreply.github.com> --- .../base/generators/GregtechRocketFuelGeneratorBase.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations') 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 b6e7b35d68..e72838fcad 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 @@ -267,12 +267,10 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ final int tFuelValue = this.getFuelValue(this.mFluid), tConsumed = this.consumedFluidPerOperation(this.mFluid); if ((tFuelValue > 0) && (tConsumed > 0) && (this.mFluid.amount >= tConsumed)) { final long tFluidAmountToUse = Math.min(this.mFluid.amount / tConsumed, (((this.maxEUOutput() * 20) + this.getMinimumStoredEU()) - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); - if ((tFluidAmountToUse > 0) && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)){ - useFuel = Utils.invertBoolean(useFuel); - int aSafeFloor= (int) Math.max(((tFluidAmountToUse * tConsumed)/3), 1); - int toConsumeTrue = (int) (useFuel ? aSafeFloor : 0); + if ((tFluidAmountToUse > 0) && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)){ + int aSafeFloor = (int) Math.max(((tFluidAmountToUse * tConsumed)/3), 1); //Logger.INFO("True consumption: "+toConsumeTrue+" | Consuming this tick? "+useFuel); - this.mFluid.amount -= toConsumeTrue; + this.mFluid.amount -= (int) aSafeFloor; PollutionUtils.addPollution(getBaseMetaTileEntity(), 10 * getPollution()); } } -- cgit From 66a364a57dc70198a1551e038e49e56c53091c1b Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Tue, 7 Jan 2020 23:37:29 +0000 Subject: $ Small fixes left over from mobile commits. --- .../implementations/base/GregtechMeta_MultiBlockBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 53068c68a1..f41efe602a 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -790,7 +790,7 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult public static Method aLogger = null; public void log(String s) { - boolean reset = true; + boolean reset = false; if (reset || aLogger == null) { if (!AsmConfig.disableAllLogging) { aLogger = ReflectionUtils.getMethod( -- cgit