net.minecraftforge.fluids

## Interface IFluidTank

- All Known Implementing Classes:
    FluidTank

      public interface IFluidTank

  A tank is the unit of interaction with Fluid inventories. A reference implementation can be found at `FluidTank`.
  Author:
    King Lemming, cpw (ILiquidTank)

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `FluidStack` | `drain(int maxDrain, boolean doDrain)`
    `int` | `fill(FluidStack resource, boolean doFill)`
    `int` | `getCapacity()`
    `FluidStack` | `getFluid()`
    `int` | `getFluidAmount()`
    `FluidTankInfo` | `getInfo()` Returns a wrapper object `FluidTankInfo` containing the capacity of the tank and the FluidStack it holds.

- - ### Method Detail

    - #### getFluid

          FluidStack getFluid()

      Returns:
        FluidStack representing the fluid in the tank, null if the tank is empty.

    - #### getFluidAmount

          int getFluidAmount()

      Returns:
        Current amount of fluid in the tank.

    - #### getCapacity

          int getCapacity()

      Returns:
        Capacity of this fluid tank.

    - #### getInfo

          FluidTankInfo getInfo()

      Returns a wrapper object `FluidTankInfo` containing the capacity of the tank and the FluidStack it holds. Should prevent manipulation of the IFluidTank. See `FluidTank`.
      Returns:
        State information for the IFluidTank.

    - #### fill

          int fill(FluidStack resource,
                 boolean doFill)

      Parameters:
        `resource` - FluidStack attempting to fill the tank.
        `doFill` - If false, the fill will only be simulated.
      Returns:
        Amount of fluid that was accepted by the tank.

    - #### drain

          FluidStack drain(int maxDrain,
                         boolean doDrain)

      Parameters:
        `maxDrain` - Maximum amount of fluid to be removed from the container.
        `doFill` - If false, the fill will only be simulated.
      Returns:
        Amount of fluid that was removed from the tank.