Package forestry.core.fluids.tanks

Examples of forestry.core.fluids.tanks.StandardTank.drain()


    StandardTank tank = tile.getTankManager().get(slot);
    int liquidAmount = tank.getFluid().amount;

    if (pipette.canPipette(itemstack) && liquidAmount > 0) {
      if (liquidAmount > 0) {
        FluidStack fillAmount = tank.drain(1000, false);
        int filled = pipette.fill(itemstack, fillAmount, true);
        tank.drain(filled, true);
      }
    } else {
      FluidStack potential = pipette.drain(itemstack, pipette.getCapacity(itemstack), false);
View Full Code Here


    if (pipette.canPipette(itemstack) && liquidAmount > 0) {
      if (liquidAmount > 0) {
        FluidStack fillAmount = tank.drain(1000, false);
        int filled = pipette.fill(itemstack, fillAmount, true);
        tank.drain(filled, true);
      }
    } else {
      FluidStack potential = pipette.drain(itemstack, pipette.getCapacity(itemstack), false);
      if (potential != null)
        pipette.drain(itemstack, tank.fill(potential, true), true);
View Full Code Here

    StandardTank tank = tanks.get(tankIndex);
    if (!tank.canBeDrainedExternally())
      return null;

    return tank.drain(maxDrain, doDrain);
  }

  @Override
  public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
    for (StandardTank tank : tanks)
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.