Interface FluidProviderItem


@Deprecated
public interface FluidProviderItem
Deprecated.
This has been completely replaced by item-based attribute accessors and FluidContainerRegistry.
An interface for Item's to implement if they can be filled and drained like a bucket.
  • Method Details

    • drain

      @Deprecated FluidVolume drain​(Ref<net.minecraft.item.ItemStack> stack)
      Deprecated.
      This has been replaced by FluidAttributes.EXTRACTABLE. get(stack). extract(maximumAmount)
      Attempts to drain some fluid from the given stack.
      Parameters:
      stack - A reference to the input stack - the stack itself should never be modified, but the reference should be.
      Returns:
      The drained fluid, or FluidVolume.isEmpty() if nothing was drained.
    • fill

      @Deprecated boolean fill​(Ref<net.minecraft.item.ItemStack> stack, Ref<FluidVolume> with)
      Deprecated.
      This has been replaced by FluidAttributes.INSERTABLE. get(stack). insert(with)
      Attempts to fill the given stack with the given fluid.
      Parameters:
      stack - A reference to the input stack - the stack itself should never be modified, but the reference should be.
      with - A reference to the input fluid - the stack itself should never be modified, but the reference should be.
      Returns:
      True if the stack was drained, false otherwise