net.minecraftforge.fluids

## Interface IFluidContainerItem

- All Known Implementing Classes:
    ItemFluidContainer

      public interface IFluidContainerItem

  Implement this interface on Item classes that support external manipulation of their internal fluid storage. A reference implementation is provided `ItemFluidContainer`. NOTE: Use of NBT data on the containing ItemStack is encouraged.
  Author:
    King Lemming

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `FluidStack` | `drain(ItemStack container, int maxDrain, boolean doDrain)`
    `int` | `fill(ItemStack container, FluidStack resource, boolean doFill)`
    `int` | `getCapacity(ItemStack container)`
    `FluidStack` | `getFluid(ItemStack container)`

- - ### Method Detail

    - #### getFluid

          FluidStack getFluid(ItemStack container)

      Parameters:
        `container` - ItemStack which is the fluid container.
      Returns:
        FluidStack representing the fluid in the container, null if the container is empty.

    - #### getCapacity

          int getCapacity(ItemStack container)

      Parameters:
        `container` - ItemStack which is the fluid container.
      Returns:
        Capacity of this fluid container.

    - #### fill

          int fill(ItemStack container,
                 FluidStack resource,
                 boolean doFill)

      Parameters:
        `container` - ItemStack which is the fluid container.
        `resource` - FluidStack attempting to fill the container.
        `doFill` - If false, the fill will only be simulated.
      Returns:
        Amount of fluid that was (or would have been, if simulated) filled into the container.

    - #### drain

          FluidStack drain(ItemStack container,
                         int maxDrain,
                         boolean doDrain)

      Parameters:
        `container` - ItemStack which is the fluid container.
        `maxDrain` - Maximum amount of fluid to be removed from the container.
        `doFill` - If false, the drain will only be simulated.
      Returns:
        Amount of fluid that was (or would have been, if simulated) drained from the container.