From f046db94220c1b582175f858f07fd64e81e6e864 Mon Sep 17 00:00:00 2001 From: miozune Date: Sun, 4 Jun 2023 19:54:11 +0900 Subject: Fix void protection not working with MB with custom output hatch field (#2051) * Fix void protection not working with MB with custom output hatch field * forgot to filter * Add util method for DT-like structure --- .../gregtech/api/interfaces/fluid/IFluidStore.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/main/java/gregtech/api/interfaces/fluid/IFluidStore.java (limited to 'src/main/java/gregtech/api/interfaces/fluid') diff --git a/src/main/java/gregtech/api/interfaces/fluid/IFluidStore.java b/src/main/java/gregtech/api/interfaces/fluid/IFluidStore.java new file mode 100644 index 0000000000..047cf4df5b --- /dev/null +++ b/src/main/java/gregtech/api/interfaces/fluid/IFluidStore.java @@ -0,0 +1,22 @@ +package gregtech.api.interfaces.fluid; + +import javax.annotation.Nonnull; + +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidTank; + +/** + * Objects implementing this interface can be used for storing certain fluid, especially for recipe output. + */ +public interface IFluidStore extends IFluidTank { + + /** + * @return If this does not have partially filled fluid nor have restriction on what fluid to accept. + */ + boolean isEmptyAndAcceptsAnyFluid(); + + /** + * @return Whether to allow given fluid to be inserted into this. + */ + boolean canStoreFluid(@Nonnull FluidStack fluidStack); +} -- cgit