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 +++++++ src/main/java/gregtech/api/interfaces/tileentity/IVoidable.java | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main/java/gregtech/api/interfaces') 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(); + } } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IVoidable.java b/src/main/java/gregtech/api/interfaces/tileentity/IVoidable.java index 841fd07bba..f55d71debc 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IVoidable.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IVoidable.java @@ -79,11 +79,4 @@ public interface IVoidable { * as this might be called every tick and cause lag. */ boolean canDumpItemToME(); - - /** - * @return If this machine has ability to dump fluid outputs to ME network. - * This doesn't need to check if it can actually dump to ME, - * as this might be called every tick and cause lag. - */ - boolean canDumpFluidToME(); } -- cgit