Class FluidItemUtil

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

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

    Modifier and Type Method Description
    static FluidKey getContainedFluid​(net.minecraft.item.ItemStack stack)
    Retrieves the first fluid contained by the given ItemStack.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.