Package logisticspipes.interfaces

Examples of logisticspipes.interfaces.IInventoryUtil.decrStackSize()


        if (_dischargeMode && SimpleServiceLocator.IC2Proxy.isFullyDischarged(stack)) {
          Triplet<Integer, SinkReply, List<IFilter>> reply = SimpleServiceLocator.logisticsManager.hasDestinationWithMinPriority(ItemIdentifier.get(stack), _service.getSourceID(), true, FixedPriority.ElectricBuffer);
          if(reply == null) continue;
          if(_service.useEnergy(10)) {
            _service.spawnParticle(Particles.OrangeParticle, 2);
            _service.sendStack(inv.decrStackSize(i,1), reply, ItemSendMode.Normal);
            return;
          }
        }
        //If item set to charge  and its fully charged, then extract it.
        if (!_dischargeMode && SimpleServiceLocator.IC2Proxy.isFullyCharged(stack)) {
View Full Code Here


        if (!_dischargeMode && SimpleServiceLocator.IC2Proxy.isFullyCharged(stack)) {
          Triplet<Integer, SinkReply, List<IFilter>> reply = SimpleServiceLocator.logisticsManager.hasDestinationWithMinPriority(ItemIdentifier.get(stack), _service.getSourceID(), true, FixedPriority.ElectricBuffer);
          if(reply == null) continue;
          if(_service.useEnergy(10)) {
            _service.spawnParticle(Particles.OrangeParticle, 2);
            _service.sendStack(inv.decrStackSize(i,1), reply, ItemSendMode.Normal);
            return;
          }
        }
      }
    }
View Full Code Here

        if(count <= 0) {
          break;
        }

        ItemStack stackToSend = targetUtil.decrStackSize(i, count);
        if(stackToSend == null || stackToSend.stackSize == 0) break;
        count = stackToSend.stackSize;
        _service.sendStack(stackToSend, reply, itemSendMode());
        itemsleft -= count;
        if(itemsleft <= 0) break;
View Full Code Here

      ItemStack returned = null;
      int amountToExtract = sizePrev - slot.stackSize;
      if(slot.stackSize > 0) {
        partialSend = true;
      }
      returned = invUtil.decrStackSize(lastStackLookedAt, amountToExtract);
      if(returned.stackSize != amountToExtract) {
        throw new UnsupportedOperationException("Couldn't extract the already sended items from the inventory.");
      }
 
      lastSuceededStack=lastStackLookedAt;
View Full Code Here

      if (stack == null) continue;
      if (SimpleServiceLocator.IC2Proxy.isElectricItem(stack)) {
        Triplet<Integer, SinkReply, List<IFilter>> reply = SimpleServiceLocator.logisticsManager.hasDestinationWithMinPriority(ItemIdentifier.get(stack), _service.getSourceID(), true, FixedPriority.ElectricManager);
        if(reply == null) continue;
        _service.spawnParticle(Particles.OrangeParticle, 2);
        _service.sendStack(inv.decrStackSize(i, 1), reply, ItemSendMode.Normal);
        return;
      }
      continue;
    }
  }
View Full Code Here

          if (SimpleServiceLocator.forestryProxy.isAnalysedBee(item)) {
            Pair<Integer, SinkReply> reply = _service.hasDestination(ItemIdentifier.get(item), true, new ArrayList<Integer>());
            if (reply == null)
              continue;
            if (_service.useEnergy(6)) {
              _service.sendStack(inv.decrStackSize(i, 1), reply, ItemSendMode.Normal);
            }
          }
        }
      }
    }
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.