Interface IBucketItem

public interface IBucketItem
General interface for any bucket-like Item to be exposed by default as a GroupedFluidInv in FluidAttributes. (Although unlike the vanilla bucket it can store fluids in NBT or be stackable). Note that any registrations to FluidContainerRegistry will be considered before this.
  • Method Details

    • libblockattributes__shouldExposeFluid

      boolean libblockattributes__shouldExposeFluid()
    • libblockattributes__getFluid

      FluidKey libblockattributes__getFluid(net.minecraft.item.ItemStack stack)
    • libblockattributes__withFluid

      net.minecraft.item.ItemStack libblockattributes__withFluid(FluidKey fluid)
      Either the ItemStack filled with the given fluid, or ItemStack.EMPTY if the given fluid is unsupported.
    • libblockattributes__drainedOfFluid

      default net.minecraft.item.ItemStack libblockattributes__drainedOfFluid(net.minecraft.item.ItemStack stack)
      Similar to libblockattributes__withFluid(FluidKey), but can return an empty stack if this bucket should be roundingLoss when drained by a machine that doesn't have special tooling/mechanisms for keeping the container around. (Unlike withFluid this is assumed to always be a valid result).
    • libblockattributes__getFluidVolumeAmount

      FluidAmount libblockattributes__getFluidVolumeAmount()
      A value such as FluidVolume.BUCKET.