aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/bartworks/common/tileentities
diff options
context:
space:
mode:
authorMaya <10861407+serenibyss@users.noreply.github.com>2024-12-02 08:12:05 -0600
committerGitHub <noreply@github.com>2024-12-02 08:12:05 -0600
commit62b6fc8498d754ae388f92b933b656da5f38dee0 (patch)
tree42668955cd42c2bdbd86f55ab860089dd6019341 /src/main/java/bartworks/common/tileentities
parent8380ef61ad9e688a2d05a9db70aa55b54288fae6 (diff)
downloadGT5-Unofficial-62b6fc8498d754ae388f92b933b656da5f38dee0.tar.gz
GT5-Unofficial-62b6fc8498d754ae388f92b933b656da5f38dee0.tar.bz2
GT5-Unofficial-62b6fc8498d754ae388f92b933b656da5f38dee0.zip
Fix ME output hatch void protection again (#3594)HEADmaster
Diffstat (limited to 'src/main/java/bartworks/common/tileentities')
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java
index e98158ec7f..4c3199f33f 100644
--- a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java
+++ b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java
@@ -56,6 +56,7 @@ import gregtech.api.recipe.RecipeMaps;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GTUtility;
import gregtech.api.util.MultiblockTooltipBuilder;
+import gregtech.common.tileentities.machines.MTEHatchOutputME;
public class MTEMegaDistillTower extends MegaMultiBlockBase<MTEMegaDistillTower> implements ISurvivalConstructable {
@@ -392,6 +393,32 @@ public class MTEMegaDistillTower extends MegaMultiBlockBase<MTEMegaDistillTower>
}
@Override
+ public boolean canDumpFluidToME() {
+
+ // All fluids can be dumped to ME only if each layer contains a ME Output Hatch.
+ for (List<MTEHatchOutput> tLayerOutputHatches : this.mOutputHatchesByLayer) {
+
+ boolean foundMEHatch = false;
+
+ for (IFluidStore tHatch : tLayerOutputHatches) {
+ if (tHatch instanceof MTEHatchOutputME tMEHatch) {
+ if (tMEHatch.canAcceptFluid()) {
+ foundMEHatch = true;
+ break;
+ }
+ }
+ }
+
+ // Exit if we didn't find a valid hatch on this layer.
+ if (!foundMEHatch) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ @Override
protected void addFluidOutputs(FluidStack[] outputFluids) {
for (int i = 0; i < outputFluids.length && i < this.mOutputHatchesByLayer.size(); i++) {
FluidStack tStack = outputFluids[i].copy();