net.minecraftforge.fluids

## Class FluidContainerRegistry

- java.lang.Object
- - net.minecraftforge.fluids.FluidContainerRegistry

-     public abstract class FluidContainerRegistry
      extends Object

  Register simple items that contain fluids here. Useful for buckets, bottles, and things that have ID/metadata mappings. For more complex items, use `IFluidContainerItem` instead.
  Author:
    King Lemming

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `FluidContainerRegistry.FluidContainerData` Wrapper class for the registry entries.
    `static class` | `FluidContainerRegistry.FluidContainerRegisterEvent`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `BUCKET_VOLUME`
    `static ItemStack` | `EMPTY_BOTTLE`
    `static ItemStack` | `EMPTY_BUCKET`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `containsFluid(ItemStack container, FluidStack fluid)` Determines if a container holds a specific fluid.
    `static ItemStack` | `fillFluidContainer(FluidStack fluid, ItemStack container)` Attempts to fill an empty container with a fluid.
    `static FluidStack` | `getFluidForFilledItem(ItemStack container)` Determines the fluid type and amount inside a container.
    `static FluidContainerRegistry.FluidContainerData[]` | `getRegisteredFluidContainerData()`
    `static boolean` | `isBucket(ItemStack container)`
    `static boolean` | `isContainer(ItemStack container)`
    `static boolean` | `isEmptyContainer(ItemStack container)`
    `static boolean` | `isFilledContainer(ItemStack container)`
    `static boolean` | `registerFluidContainer(FluidContainerRegistry.FluidContainerData data)` Register a new fluid containing item.
    `static boolean` | `registerFluidContainer(Fluid fluid, ItemStack filledContainer)` Register a new fluid containing item that does not have an empty container.
    `static boolean` | `registerFluidContainer(Fluid fluid, ItemStack filledContainer, ItemStack emptyContainer)` Register a new fluid containing item.
    `static boolean` | `registerFluidContainer(FluidStack stack, ItemStack filledContainer)` Register a new fluid containing item that does not have an empty container.
    `static boolean` | `registerFluidContainer(FluidStack stack, ItemStack filledContainer, ItemStack emptyContainer)` Register a new fluid containing item.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### BUCKET_VOLUME

          public static final int BUCKET_VOLUME

      See Also:
        Constant Field Values

    - #### EMPTY_BUCKET

          public static final ItemStack EMPTY_BUCKET

    - #### EMPTY_BOTTLE

          public static final ItemStack EMPTY_BOTTLE

  - ### Method Detail

    - #### registerFluidContainer

          public static boolean registerFluidContainer(FluidStack stack,
                                       ItemStack filledContainer,
                                       ItemStack emptyContainer)

      Register a new fluid containing item.
      Parameters:
        `stack` - FluidStack containing the type and amount of the fluid stored in the item.
        `filledContainer` - ItemStack representing the container when it is full.
        `emptyContainer` - ItemStack representing the container when it is empty.
      Returns:
        True if container was successfully registered; false if it already is.

    - #### registerFluidContainer

          public static boolean registerFluidContainer(Fluid fluid,
                                       ItemStack filledContainer,
                                       ItemStack emptyContainer)

      Register a new fluid containing item. The item is assumed to hold 1000 mB of fluid. Also registers the Fluid if possible.
      Parameters:
        `fluid` - Fluid type that is stored in the item.
        `filledContainer` - ItemStack representing the container when it is full.
        `emptyContainer` - ItemStack representing the container when it is empty.
      Returns:
        True if container was successfully registered; false if it already is.

    - #### registerFluidContainer

          public static boolean registerFluidContainer(FluidStack stack,
                                       ItemStack filledContainer)

      Register a new fluid containing item that does not have an empty container.
      Parameters:
        `stack` - FluidStack containing the type and amount of the fluid stored in the item.
        `filledContainer` - ItemStack representing the container when it is full.
      Returns:
        True if container was successfully registered; false if it already is.

    - #### registerFluidContainer

          public static boolean registerFluidContainer(Fluid fluid,
                                       ItemStack filledContainer)

      Register a new fluid containing item that does not have an empty container. The item is assumed to hold 1000 mB of fluid. Also registers the Fluid if possible.
      Parameters:
        `fluid` - Fluid type that is stored in the item.
        `filledContainer` - ItemStack representing the container when it is full.
      Returns:
        True if container was successfully registered; false if it already is.

    - #### registerFluidContainer

          public static boolean registerFluidContainer(FluidContainerRegistry.FluidContainerData data)

      Register a new fluid containing item.
      Parameters:
        `data` - See `FluidContainerRegistry.FluidContainerData`.
      Returns:
        True if container was successfully registered; false if it already is.

    - #### getFluidForFilledItem

          public static FluidStack getFluidForFilledItem(ItemStack container)

      Determines the fluid type and amount inside a container.
      Parameters:
        `container` - The fluid container.
      Returns:
        FluidStack representing stored fluid.

    - #### fillFluidContainer

          public static ItemStack fillFluidContainer(FluidStack fluid,
                                     ItemStack container)

      Attempts to fill an empty container with a fluid. NOTE: Returns null on fail, NOT the empty container.
      Parameters:
        `fluid` - FluidStack containing the type and amount of fluid to fill.
        `container` - ItemStack representing the empty container.
      Returns:
        Filled container if successful, otherwise null.

    - #### containsFluid

          public static boolean containsFluid(ItemStack container,
                              FluidStack fluid)

      Determines if a container holds a specific fluid.

    - #### isBucket

          public static boolean isBucket(ItemStack container)

    - #### isContainer

          public static boolean isContainer(ItemStack container)

    - #### isEmptyContainer

          public static boolean isEmptyContainer(ItemStack container)

    - #### isFilledContainer

          public static boolean isFilledContainer(ItemStack container)

    - #### getRegisteredFluidContainerData

          public static FluidContainerRegistry.FluidContainerData[] getRegisteredFluidContainerData()