Class FluidHandlerItemStackSimple.SwapEmpty

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

@Deprecated(since="1.21.9", forRemoval=true) public static class FluidHandlerItemStackSimple.SwapEmpty extends FluidHandlerItemStackSimple
Deprecated, for removal: This API element is subject to removal in a future version.
Swaps the container item for a different one when it's emptied.
  • Field Details

    • emptyContainer

      protected final ItemStack emptyContainer
      Deprecated, for removal: This API element is subject to removal in a future version.
  • 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