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/common/tileentities/machines/MTEHatchOutputME.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/common/tileentities/machines/MTEHatchOutputME.java')
-rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/MTEHatchOutputME.java | 10 |
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 |