Package logisticspipes.interfaces

Examples of logisticspipes.interfaces.ISpecialTankHandler


    amountToSend = attemptedAmount = Math.min(order.getValue2(), 5000);
    for(Pair<TileEntity, ForgeDirection> pair:getAdjacentTanks(false)) {
      if(amountToSend <= 0) break;
      boolean fallback = true;
      if(SimpleServiceLocator.specialTankHandler.hasHandlerFor(pair.getValue1())) {
        ISpecialTankHandler handler = SimpleServiceLocator.specialTankHandler.getTankHandlerFor(pair.getValue1());
        if(handler instanceof ISpecialTankAccessHandler) {
          fallback = false;
          FluidStack drained = ((ISpecialTankAccessHandler)handler).drainFrom(pair.getValue1(), order.getValue1(), amountToSend, false);
          if(drained != null && order.getValue1().equals(FluidIdentifier.get(drained))) {
            drained = ((ISpecialTankAccessHandler)handler).drainFrom(pair.getValue1(), order.getValue1(), amountToSend, true);
View Full Code Here


  public Map<FluidIdentifier, Integer> getAvailableFluids() {
    Map<FluidIdentifier, Integer> map = new HashMap<FluidIdentifier, Integer>();
    for(Pair<TileEntity, ForgeDirection> pair:getAdjacentTanks(false)) {
      boolean fallback = true;
      if(SimpleServiceLocator.specialTankHandler.hasHandlerFor(pair.getValue1())) {
        ISpecialTankHandler handler = SimpleServiceLocator.specialTankHandler.getTankHandlerFor(pair.getValue1());
        if(handler instanceof ISpecialTankAccessHandler) {
          fallback = false;
          Map<FluidIdentifier, Long> tmp = ((ISpecialTankAccessHandler)handler).getAvailableLiquid(pair.getValue1());
          for(Entry<FluidIdentifier, Long> entry: tmp.entrySet()) {
            if(map.containsKey(entry.getKey())) {
View Full Code Here

    if(request.isDone()) return;
    int containedAmount = 0;
    for(Pair<TileEntity, ForgeDirection> pair:getAdjacentTanks(false)) {
      boolean fallback = true;
      if(SimpleServiceLocator.specialTankHandler.hasHandlerFor(pair.getValue1())) {
        ISpecialTankHandler handler = SimpleServiceLocator.specialTankHandler.getTankHandlerFor(pair.getValue1());
        if(handler instanceof ISpecialTankAccessHandler) {
          fallback = false;
          Map<FluidIdentifier, Long> map = ((ISpecialTankAccessHandler)handler).getAvailableLiquid(pair.getValue1());
          if(map.containsKey(request.getFluid())) {
            long addition = ((long) containedAmount) + map.get(request.getFluid());
View Full Code Here

  public Set<ItemIdentifier> getSpecificInterests() {
    Set<ItemIdentifier> l1 = new TreeSet<ItemIdentifier>();
    for(Pair<TileEntity, ForgeDirection> pair:getAdjacentTanks(false)) {
      boolean fallback = true;
      if(SimpleServiceLocator.specialTankHandler.hasHandlerFor(pair.getValue1())) {
        ISpecialTankHandler handler = SimpleServiceLocator.specialTankHandler.getTankHandlerFor(pair.getValue1());
        if(handler instanceof ISpecialTankAccessHandler) {
          fallback = false;
          Map<FluidIdentifier, Long> map = ((ISpecialTankAccessHandler)handler).getAvailableLiquid(pair.getValue1());
          for(FluidIdentifier ident:map.keySet()) {
            l1.add(ident.getItemIdentifier());
View Full Code Here

TOP

Related Classes of logisticspipes.interfaces.ISpecialTankHandler

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.