diff options
Diffstat (limited to 'src/main/java/gregtech/common/tileentities')
-rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/MTEHatchOutputME.java | 10 | ||||
-rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/multi/MTEDistillationTower.java | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/MTEHatchOutputME.java b/src/main/java/gregtech/common/tileentities/machines/MTEHatchOutputME.java index 7ddf136a72..b502ad54d3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/MTEHatchOutputME.java +++ b/src/main/java/gregtech/common/tileentities/machines/MTEHatchOutputME.java @@ -161,6 +161,16 @@ public class MTEHatchOutputME extends MTEHatchOutput implements IPowerChannelSta } /** + * Get the available fluid space, up to max int. + */ + @Override + public int getAvailableSpace() { + long availableSpace = getCacheCapacity() - getCachedAmount(); + if (availableSpace > Integer.MAX_VALUE) availableSpace = Integer.MAX_VALUE; + return (int) availableSpace; + } + + /** * Attempt to store fluid in connected ME network. Returns how much fluid is accepted (if the network was down e.g.) * * @param aFluid input fluid diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEDistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEDistillationTower.java index 93b64c16a8..bbba029449 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEDistillationTower.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEDistillationTower.java @@ -47,7 +47,6 @@ import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; import gregtech.api.render.TextureFactory; import gregtech.api.util.MultiblockTooltipBuilder; -import gregtech.common.tileentities.machines.MTEHatchOutputME; public class MTEDistillationTower extends MTEEnhancedMultiBlockBase<MTEDistillationTower> implements ISurvivalConstructable { @@ -294,15 +293,6 @@ public class MTEDistillationTower extends MTEEnhancedMultiBlockBase<MTEDistillat } @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 MTEHatchOutputME tMEHatch) && (tMEHatch.canAcceptFluid()))); - } - - @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 |