aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/tileentities/machines/MTEHatchOutputME.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines/MTEHatchOutputME.java')
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/MTEHatchOutputME.java10
1 files changed, 10 insertions, 0 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