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/api/interfaces | |
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/api/interfaces')
-rw-r--r-- | src/main/java/gregtech/api/interfaces/fluid/IFluidStore.java | 7 | ||||
-rw-r--r-- | src/main/java/gregtech/api/interfaces/tileentity/IVoidable.java | 7 |
2 files changed, 7 insertions, 7 deletions
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(); } |