Class FluidItemUtil

java.lang.Object
alexiil.mc.lib.attributes.fluid.FluidItemUtil

public final class FluidItemUtil extends Object
Various utilities for dealing with fluids contained in single ItemStacks.
  • Method Details

    • getContainedFluid

      public static FluidKey getContainedFluid(net.minecraft.item.ItemStack stack)
      Retrieves the first fluid contained by the given ItemStack.
      Returns:
      The FluidKey if the ItemStack contained any, or FluidKeys.EMPTY if none were present.