Examples of LPTravelingItemServer


Examples of logisticspipes.transport.LPTravelingItem.LPTravelingItemServer

            info = ((LPRoutedBCTravelingItem)((DropItem)event).item).getRoutingInformation();
          } else {
            info = LPRoutedBCTravelingItem.restoreFromExtraNBTData(((DropItem)event).item);
          }
          if(info != null) {
            LPTravelingItemServer lpItem = new LPTravelingItemServer(info);
            lpItem.setContainer(pipe.container);
            lpItem.itemWasLost();
          }
        }
      }
    }
  }
View Full Code Here

Examples of logisticspipes.transport.LPTravelingItem.LPTravelingItemServer

    return createNewTravelItem(ItemIdentifierStack.getFromStack(item));
  }
 
 
  public LPTravelingItemServer createNewTravelItem(ItemIdentifierStack item) {
    return new LPTravelingItemServer(item);
  }
View Full Code Here

Examples of logisticspipes.transport.LPTravelingItem.LPTravelingItemServer

  public LPTravelingItemServer createNewTravelItem(ItemIdentifierStack item) {
    return new LPTravelingItemServer(item);
  }

  public LPTravelingItemServer createNewTravelItem(ItemRoutingInformation info) {
    return new LPTravelingItemServer(info);
  }
View Full Code Here

Examples of logisticspipes.transport.LPTravelingItem.LPTravelingItemServer

          Pair<ItemIdentifierStack, Pair<Integer, Integer>> next = iterator.next();
          int currentTimeOut = next.getValue2().getValue1();
          if(currentTimeOut > 0) {
            next.getValue2().setValue1(currentTimeOut - 1);
          } else {
            LPTravelingItemServer item = SimpleServiceLocator.routedItemHelper.createNewTravelItem(next.getValue1());
            item.setDoNotBuffer(true);
            item.setBufferCounter(next.getValue2().getValue2() + 1);
            toAdd.add(item);
            iterator.remove();
          }
        }
        for(LPTravelingItem item: toAdd) {
View Full Code Here

Examples of logisticspipes.transport.LPTravelingItem.LPTravelingItemServer

   
    for(int j = 0; j < nbttaglist.tagCount(); ++j) {
      try {
        NBTTagCompound dataTag = nbttaglist.getCompoundTagAt(j);
       
        LPTravelingItem item = new LPTravelingItemServer(dataTag);
       
        if(item.isCorrupted()) {
          continue;
        }
       
        items.scheduleLoad(item);
      } catch(Throwable t) {
View Full Code Here

Examples of logisticspipes.transport.LPTravelingItem.LPTravelingItemServer

  public void injectItem(TravelingItem item, ForgeDirection inputOrientation) {
    if(MainProxy.isServer(this.getWorld())) {
      if(item instanceof LPRoutedBCTravelingItem) {
        ItemRoutingInformation info = ((LPRoutedBCTravelingItem)item).getRoutingInformation();
        info.setItem(ItemIdentifierStack.getFromStack(item.getItemStack()));
        LPTravelingItemServer lpItem = new LPTravelingItemServer(info);
        this.injectItem(lpItem, inputOrientation);
      } else {
        ItemRoutingInformation info = LPRoutedBCTravelingItem.restoreFromExtraNBTData(item);
        if(info != null) {
          info.setItem(ItemIdentifierStack.getFromStack(item.getItemStack()));
          LPTravelingItemServer lpItem = new LPTravelingItemServer(info);
          this.injectItem(lpItem, inputOrientation);
        } else {
          LPTravelingItemServer lpItem = SimpleServiceLocator.routedItemHelper.createNewTravelItem(item.getItemStack());
          lpItem.setSpeed(item.getSpeed());
          this.injectItem(lpItem, inputOrientation);
        }
      }
    }
  }
View Full Code Here

Examples of logisticspipes.transport.LPTravelingItem.LPTravelingItemServer

    _sendQueue.clear();
    NBTTagList sendqueue = nbttagcompound.getTagList("sendqueue", nbttagcompound.getId());
    for(int i = 0; i < sendqueue.tagCount(); i++) {
      NBTTagCompound tagentry = sendqueue.getCompoundTagAt(i);
      NBTTagCompound tagentityitem = tagentry.getCompoundTag("entityitem");
      LPTravelingItemServer item = new LPTravelingItemServer(tagentityitem);
      ForgeDirection from = ForgeDirection.values()[tagentry.getByte("from")];
      ItemSendMode mode = ItemSendMode.values()[tagentry.getByte("mode")];
      _sendQueue.add(new Triplet<IRoutedItem, ForgeDirection, ItemSendMode>(item, from, mode));
    }
    for(int i=0;i<6;i++) {
View Full Code Here

Examples of logisticspipes.transport.LPTravelingItem.LPTravelingItemServer

  }

  @Override
  public void processPacket(EntityPlayer player) {
    WeakReference<LPTravelingItemServer> ref = LPTravelingItem.serverList.get(getInteger());
    LPTravelingItemServer item = null;
    if(ref != null) item = ref.get();
    if(item != null) {
      MainProxy.sendPacketToPlayer(PacketHandler.getPacket(PipeContentPacket.class).setItem(item.getItemIdentifierStack()).setTravelId(item.getId()), player);
    }
  }
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.