Package forestry.core.fluids

Examples of forestry.core.fluids.TankManager


  }

  @Override
  public void updateProgressBar(int i, int j) {
    tile.getGUINetworkData(i, j);
    TankManager tankManager = tile.getTankManager();
    if (tankManager != null)
      tankManager.processGuiUpdate(i, j);
  }
View Full Code Here


  @Override
  @SuppressWarnings("unchecked")
  public void detectAndSendChanges() {
    super.detectAndSendChanges();
    TankManager tankManager = tile.getTankManager();
    if (tankManager != null)
      tankManager.updateGuiData(this, crafters);

    for (int i = 0; i < crafters.size(); i++) {
      tile.sendGUINetworkData(this, (ICrafting) crafters.get(i));
    }
  }
View Full Code Here

  }

  @Override
  public void addCraftingToCrafters(ICrafting iCrafting) {
    super.addCraftingToCrafters(iCrafting);
    TankManager tankManager = tile.getTankManager();
    if (tankManager != null)
      tankManager.initGuiData(this, iCrafting);
  }
View Full Code Here

    ITileStructure central = ((TileHatch) tile).getCentralTE();
    if (central == null || !(central instanceof TileFarmPlain))
      return false;

    TankManager tankManager = ((TileFarmPlain) central).getTankManager();
    FluidTankInfo info = tankManager.getTankInfo(0);
    if (info.fluid == null)
      return true;
    return ((float) info.fluid.amount / info.capacity) <= threshold;
  }
View Full Code Here

  }

  /* ILIQUIDTANKCONTAINER */
  @Override
  public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
    TankManager tankManager = getTankManager();
    if (tankManager == null)
      return FakeTank.INSTANCE.fill(resource, doFill);

    return tankManager.fill(from, resource, doFill);
  }
View Full Code Here

    return tankManager.fill(from, resource, doFill);
  }

  @Override
  public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
    TankManager tankManager = getTankManager();
    if (tankManager == null)
      return null;

    return tankManager.drain(from, resource, doDrain);
  }
View Full Code Here

    return tankManager.drain(from, resource, doDrain);
  }

  @Override
  public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
    TankManager tankManager = getTankManager();
    if (tankManager == null)
      return FakeTank.INSTANCE.drain(maxDrain, doDrain);

    return tankManager.drain(from, maxDrain, doDrain);
  }
View Full Code Here

    return tankManager.drain(from, maxDrain, doDrain);
  }

  @Override
  public boolean canFill(ForgeDirection from, Fluid fluid) {
    TankManager tankManager = getTankManager();
    if (tankManager == null)
      return true;

    return tankManager.canFill(from, fluid);
  }
View Full Code Here

    return tankManager.canFill(from, fluid);
  }

  @Override
  public boolean canDrain(ForgeDirection from, Fluid fluid) {
    TankManager tankManager = getTankManager();
    if (tankManager == null)
      return false;

    return tankManager.canDrain(from, fluid);
  }
View Full Code Here

    return tankManager.canDrain(from, fluid);
  }

  @Override
  public FluidTankInfo[] getTankInfo(ForgeDirection from) {
    TankManager tankManager = getTankManager();
    if (tankManager == null)
      return FakeTank.INFO;

    return tankManager.getTankInfo(from);
  }
View Full Code Here

TOP

Related Classes of forestry.core.fluids.TankManager

Copyright © 2018 www.massapicom. 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.