001    package net.minecraftforge.liquids;
002    
003    import net.minecraftforge.common.ForgeDirection;
004    
005    public interface ITankContainer {
006    
007        /**
008         * Fills liquid into internal tanks, distribution is left to the ITankContainer.
009         * @param from Orientation the liquid is pumped in from.
010         * @param resource LiquidStack representing the maximum amount of liquid filled into the ITankContainer
011         * @param doFill If false filling will only be simulated.
012         * @return Amount of resource that was filled into internal tanks.
013         */
014        int fill(ForgeDirection from, LiquidStack resource, boolean doFill);
015        /**
016         * Fills liquid into the specified internal tank.
017         * @param from Orientation the liquid is pumped in from.
018         * @param resource LiquidStack representing the maximum amount of liquid filled into the ITankContainer
019         * @param doFill If false filling will only be simulated.
020         * @return Amount of resource that was filled into internal tanks.
021         */
022        int fill(int tankIndex, LiquidStack resource, boolean doFill);
023    
024        /**
025         * Drains liquid out of internal tanks, distribution is left to the ITankContainer.
026         * @param from Orientation the liquid is drained to.
027         * @param maxDrain Maximum amount of liquid to drain.
028         * @param doDrain If false draining will only be simulated.
029         * @return LiquidStack representing the liquid and amount actually drained from the ITankContainer
030         */
031        LiquidStack drain(ForgeDirection from, int maxDrain, boolean doDrain);
032        /**
033         * Drains liquid out of the specified internal tank.
034         * @param from Orientation the liquid is drained to.
035         * @param maxDrain Maximum amount of liquid to drain.
036         * @param doDrain If false draining will only be simulated.
037         * @return LiquidStack representing the liquid and amount actually drained from the ITankContainer
038         */
039        LiquidStack drain(int tankIndex, int maxDrain, boolean doDrain);
040    
041        /**
042         * @param direction tank side: UNKNOWN for default tank set
043         * @return Array of {@link LiquidTank}s contained in this ITankContainer
044         */
045        ILiquidTank[] getTanks(ForgeDirection direction);
046    
047    }