Example usage for net.minecraftforge.fluids FluidUtil tryPickUpFluid

List of usage examples for net.minecraftforge.fluids FluidUtil tryPickUpFluid

Introduction

In this page you can find the example usage for net.minecraftforge.fluids FluidUtil tryPickUpFluid.

Prototype

@Nonnull
public static FluidActionResult tryPickUpFluid(@Nonnull ItemStack emptyContainer,
        @Nullable PlayerEntity playerIn, World worldIn, BlockPos pos, Direction side) 

Source Link

Document

Attempts to pick up a fluid in the world and put it in an empty container item.

Usage

From source file:com.lothrazar.cyclicmagic.util.UtilFluid.java

License:Open Source License

/**
 * Picks up fluid fills a container with it.
 *///  w  w w. jav a2  s . c o  m
public static FluidActionResult fillContainer(World world, BlockPos pos, ItemStack stackIn, EnumFacing facing) {
    //    ItemStack result = stackIn.copy();
    return FluidUtil.tryPickUpFluid(stackIn, null, world, pos, facing);
    //  if (--stackIn.stackSize == 0) {
    //    stackIn.deserializeNBT(result.serializeNBT());
    //  }
    //    if (res == FluidActionResult.FAILURE) { return stackIn; }
    //    return res.getResult();
}