001    package net.minecraftforge.liquids;
002    
003    public interface ILiquidTank {
004    
005        /**
006         * @return LiquidStack representing the liquid contained in the tank, null if empty.
007         */
008        LiquidStack getLiquid();
009        void setLiquid(LiquidStack liquid);
010        void setCapacity(int capacity);
011        int getCapacity();
012    
013        /**
014         * 
015         * @param resource
016         * @param doFill
017         * @return Amount of liquid used for filling.
018         */
019        int fill(LiquidStack resource, boolean doFill);
020        /**
021         * 
022         * @param maxDrain
023         * @param doDrain
024         * @return Null if nothing was drained, otherwise a LiquidStack containing the drained.
025         */
026        LiquidStack drain(int maxDrain, boolean doDrain);
027    }