aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHoleFish <48403212+HoleFish@users.noreply.github.com>2024-01-21 02:52:41 +0800
committerGitHub <noreply@github.com>2024-01-20 19:52:41 +0100
commit8620003af42f5ab643c2794f41c31c065ea3715b (patch)
treebf5600e8f8d093cd26d5db0d4b4d32368ac95290 /src
parent6ecc0ea5e31405c60f3c600f2c4f0b8c0f494ab8 (diff)
downloadGT5-Unofficial-8620003af42f5ab643c2794f41c31c065ea3715b.tar.gz
GT5-Unofficial-8620003af42f5ab643c2794f41c31c065ea3715b.tar.bz2
GT5-Unofficial-8620003af42f5ab643c2794f41c31c065ea3715b.zip
Fix void protection of distillation tower with ME output hatches (#2467)
override canDumpFluidToME
Diffstat (limited to 'src')
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
index 6dd47f0bf7..dfc3a4928d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
@@ -47,6 +47,7 @@ import gregtech.api.recipe.RecipeMap;
import gregtech.api.recipe.RecipeMaps;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Output_ME;
public class GT_MetaTileEntity_DistillationTower extends
GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_DistillationTower> implements ISurvivalConstructable {
@@ -302,6 +303,15 @@ public class GT_MetaTileEntity_DistillationTower extends
}
@Override
+ public boolean canDumpFluidToME() {
+ // All fluids can be dumped to ME only if each layer contains a ME Output Hatch.
+ return this.mOutputHatchesByLayer.stream()
+ .allMatch(
+ tLayerOutputHatches -> tLayerOutputHatches.stream()
+ .anyMatch(tHatch -> tHatch instanceof GT_MetaTileEntity_Hatch_Output_ME));
+ }
+
+ @Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
buildPiece(STRUCTURE_PIECE_BASE, stackSize, hintsOnly, 1, 0, 0);
int tTotalHeight = Math.min(12, stackSize.stackSize + 2); // min 2 output layer, so at least 1 + 2 height