blob: 5b5bb08c8750ef43715a5b029d7b82320c4de0fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
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);
/**
* @return The amount of fluid that can be stored in this.
*/
default int getAvailableSpace() {
return getCapacity() - getFluidAmount();
}
}
|