List of usage examples for net.minecraftforge.fluids FluidUtil tryPickUpFluid
@Nonnull public static FluidActionResult tryPickUpFluid(@Nonnull ItemStack emptyContainer, @Nullable PlayerEntity playerIn, World worldIn, BlockPos pos, Direction side)
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(); }