Interface IFluidHandlerItem

All Superinterfaces:
IFluidHandler
All Known Implementing Classes:
FluidBucketWrapper, FluidHandlerItemStack, FluidHandlerItemStack.Consumable, FluidHandlerItemStack.SwapEmpty, FluidHandlerItemStackSimple, FluidHandlerItemStackSimple.Consumable, FluidHandlerItemStackSimple.SwapEmpty, FluidResourceHandlerItemAdapter

@Deprecated(since="1.21.9", forRemoval=true) public interface IFluidHandlerItem extends IFluidHandler
Deprecated, for removal: This API element is subject to removal in a future version.
Use ResourceHandler with a FluidResource instead. To apply changes to an underlying item container, capture an ItemAccess, as provided for example by the Capabilities.Fluid.ITEM capability. Code that is written against IFluidHandlerItem can temporarily use FluidUtil.getFluidHandler(ItemStack) to ease migration.
ItemStacks handled by an IFluidHandler may change, so this class allows users of the fluid handler to get the container after it has been used.
  • Method Details

    • getContainer

      @Deprecated(since="1.21.9", forRemoval=true) ItemStack getContainer()
      Deprecated, for removal: This API element is subject to removal in a future version.
      There is no equivalent to this method, since in the new system the container is changed directly via an ItemAccess.
      Get the container currently acted on by this fluid handler. The ItemStack may be different from its initial state, in the case of fluid containers that have different items for their filled and empty states. May be an empty item if the container was drained and is consumable.