Interface FluidProviderItem


@Deprecated(since="0.5.0", forRemoval=true) public interface FluidProviderItem
Deprecated, for removal: This API element is subject to removal in a future version.
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 Summary

    Modifier and Type
    Method
    Description
    drain​(Ref<net.minecraft.item.ItemStack> stack)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This has been replaced by FluidAttributes.EXTRACTABLE.
    boolean
    fill​(Ref<net.minecraft.item.ItemStack> stack, Ref<FluidVolume> with)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This has been replaced by FluidAttributes.INSERTABLE.
  • Method Details

    • drain

      @Deprecated(since="0.5.0", forRemoval=true) FluidVolume drain(Ref<net.minecraft.item.ItemStack> stack)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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(since="0.5.0", forRemoval=true) boolean fill(Ref<net.minecraft.item.ItemStack> stack, Ref<FluidVolume> with)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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