diff options
author | Maya <10861407+serenibyss@users.noreply.github.com> | 2024-12-01 05:56:00 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-01 12:56:00 +0100 |
commit | fd1becc546c966bf7894849c843f1dcc0919618b (patch) | |
tree | bf82d856f0b744ce89bfcc40dc8b7118bb2b2081 /src/main/java/gregtech/api/util/VoidProtectionHelper.java | |
parent | dc8102edbdb28529beeb5bf762c378f766c1243d (diff) | |
download | GT5-Unofficial-fd1becc546c966bf7894849c843f1dcc0919618b.tar.gz GT5-Unofficial-fd1becc546c966bf7894849c843f1dcc0919618b.tar.bz2 GT5-Unofficial-fd1becc546c966bf7894849c843f1dcc0919618b.zip |
Fix ME Output Hatch void protection checks (#3585)
Diffstat (limited to 'src/main/java/gregtech/api/util/VoidProtectionHelper.java')
-rw-r--r-- | src/main/java/gregtech/api/util/VoidProtectionHelper.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/gregtech/api/util/VoidProtectionHelper.java b/src/main/java/gregtech/api/util/VoidProtectionHelper.java index cf98e26b66..227601113b 100644 --- a/src/main/java/gregtech/api/util/VoidProtectionHelper.java +++ b/src/main/java/gregtech/api/util/VoidProtectionHelper.java @@ -214,7 +214,7 @@ public class VoidProtectionHelper { return; } } - if (protectExcessFluid && fluidOutputs.length > 0 && !machine.canDumpFluidToME()) { + if (protectExcessFluid && fluidOutputs.length > 0) { maxParallel = Math.min(calculateMaxFluidParallels(), maxParallel); if (maxParallel <= 0) { isFluidFull = true; @@ -255,7 +255,7 @@ public class VoidProtectionHelper { } for (IFluidStore tHatch : hatches) { - int tSpaceLeft = tHatch.getCapacity() - tHatch.getFluidAmount(); + int tSpaceLeft = tHatch.getAvailableSpace(); // check if hatch filled if (tSpaceLeft <= 0) continue; @@ -289,7 +289,7 @@ public class VoidProtectionHelper { ParallelStackInfo<FluidStack> tParallel = aParallelQueue.poll(); assert tParallel != null; // will always be true, specifying assert here to avoid IDE/compiler warnings Integer tCraftSize = tFluidOutputMap.get(tParallel.stack); - int tSpaceLeft = tHatch.getCapacity(); + int tSpaceLeft = tHatch.getAvailableSpace(); tParallel.batch += (tParallel.partial + tSpaceLeft) / tCraftSize; tParallel.partial = (tParallel.partial + tSpaceLeft) % tCraftSize; aParallelQueue.add(tParallel); |