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 Summary
Modifier and TypeMethodDescriptiondefault net.minecraft.item.ItemStack
libblockattributes__drainedOfFluid(net.minecraft.item.ItemStack stack)
Similar tolibblockattributes__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.libblockattributes__getFluid(net.minecraft.item.ItemStack stack)
boolean
net.minecraft.item.ItemStack
-
Method Details
-
libblockattributes__shouldExposeFluid
boolean libblockattributes__shouldExposeFluid() -
libblockattributes__getFluid
-
libblockattributes__withFluid
- Returns:
- Either the
ItemStack
filled with the given fluid, orItemStack.EMPTY
if the given fluid is unsupported.
-
libblockattributes__drainedOfFluid
default net.minecraft.item.ItemStack libblockattributes__drainedOfFluid(net.minecraft.item.ItemStack stack)Similar tolibblockattributes__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()- Returns:
- A value such as
FluidVolume.BUCKET
.
-