Package net.minecraftforge.fluids

Examples of net.minecraftforge.fluids.IFluidBlock.drain()


      } else {
        return null;
      }
    } else if (bId instanceof IFluidBlock) {
      IFluidBlock block = (IFluidBlock) bId;
      return block.drain(world, x, y, z, true);
    }
    return null;
  }

  public static Fluid lookupFluidForBlock(Block block) {
View Full Code Here


    {
      IFluidBlock fluid = (IFluidBlock)block;

      if(meta == 0)
      {
        return fluid.drain(world, x, y, z, false);
      }
    }

    return null;
  }
View Full Code Here

            if (fluidHit != null)
            {
                if (fluidHit.getName().equalsIgnoreCase("oil"))
                {
                    FluidStack stack = fluidBlockHit.drain(world, x, y, z, doDrain);
                    return stack != null && stack.amount > 0;
                }
            }
        }
View Full Code Here

      if (block instanceof IFluidBlock) {
        IFluidBlock flBlock = (IFluidBlock) block;

        if (flBlock.canDrain(world, x, y, z)) {
          ItemStack stack = new ItemStack(Items.bucket);
          stack = FluidContainerRegistry.fillFluidContainer(flBlock.drain(world, x, y, z, false), stack);

          if (stack != null) {
            flBlock.drain(world, x, y, z, true);
            return stack;
          }
View Full Code Here

        if (flBlock.canDrain(world, x, y, z)) {
          ItemStack stack = new ItemStack(Items.bucket);
          stack = FluidContainerRegistry.fillFluidContainer(flBlock.drain(world, x, y, z, false), stack);

          if (stack != null) {
            flBlock.drain(world, x, y, z, true);
            return stack;
          }
        }
      }
      return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.