Class FluidHandlerItemStackSimple.Consumable

java.lang.Object
net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStackSimple
net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStackSimple.Consumable
All Implemented Interfaces:
IFluidHandler, IFluidHandlerItem
Enclosing class:
FluidHandlerItemStackSimple

@Deprecated(since="1.21.9", forRemoval=true) public static class FluidHandlerItemStackSimple.Consumable extends FluidHandlerItemStackSimple
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated with no direct equivalent, however ItemAccessFluidHandler can serve as inspiration. Please open an issue on GitHub if you have a use for an equivalent of this class.
Destroys the container item when it's emptied.
  • Constructor Details

  • Method Details

    • setContainerToEmpty

      protected void setContainerToEmpty()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: FluidHandlerItemStackSimple
      Override this method for special handling. Can be used to swap out the container's item for a different one with "container.setItem". Can be used to destroy the container with "container.stackSize--"
      Overrides:
      setContainerToEmpty in class FluidHandlerItemStackSimple