From fd1becc546c966bf7894849c843f1dcc0919618b Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Sun, 1 Dec 2024 05:56:00 -0600 Subject: Fix ME Output Hatch void protection checks (#3585) --- src/main/java/gregtech/api/interfaces/fluid/IFluidStore.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main/java/gregtech/api/interfaces/fluid/IFluidStore.java') diff --git a/src/main/java/gregtech/api/interfaces/fluid/IFluidStore.java b/src/main/java/gregtech/api/interfaces/fluid/IFluidStore.java index 047cf4df5b..5b5bb08c87 100644 --- a/src/main/java/gregtech/api/interfaces/fluid/IFluidStore.java +++ b/src/main/java/gregtech/api/interfaces/fluid/IFluidStore.java @@ -19,4 +19,11 @@ public interface IFluidStore extends IFluidTank { * @return Whether to allow given fluid to be inserted into this. */ boolean canStoreFluid(@Nonnull FluidStack fluidStack); + + /** + * @return The amount of fluid that can be stored in this. + */ + default int getAvailableSpace() { + return getCapacity() - getFluidAmount(); + } } -- cgit