Package logisticspipes.utils.gui

Examples of logisticspipes.utils.gui.DummyContainer.addRestrictedSlot()


       
      case GuiIDs.GUI_Inv_Sys_Connector_ID:
        if(pipe == null || pipe.pipe == null || !(pipe.pipe instanceof PipeItemsInvSysConnector)) return null;
        dummy = new DummyContainer(player.inventory, ((PipeItemsInvSysConnector)pipe.pipe).inv);
       
        dummy.addRestrictedSlot(0, ((PipeItemsInvSysConnector)pipe.pipe).inv, 50, 10, new ISlotCheck() {
          @Override
          public boolean isStackAllowed(ItemStack itemStack) {
            if(itemStack == null) return false;
            if(itemStack.getItem() != LogisticsPipes.LogisticsItemCard) return false;
            if(itemStack.getItemDamage() != LogisticsItemCard.FREQ_CARD) return false;
View Full Code Here


          inv = ((PipeItemsSystemDestinationLogistics)pipe.pipe).inv;
        }
       
        dummy = new DummyContainer(player.inventory, inv);
       
        dummy.addRestrictedSlot(0, inv, 40, 40, new ISlotCheck() {
          @Override
          public boolean isStackAllowed(ItemStack itemStack) {
            if(itemStack == null) return false;
            if(itemStack.getItem() != LogisticsPipes.LogisticsItemCard) return false;
            if(itemStack.getItemDamage() != LogisticsItemCard.FREQ_CARD) return false;
View Full Code Here

    DummyContainer dummy = new DummyContainer(player, inv, getGuiController());
    dummy.addNormalSlotsForPlayerInventory(8, isCombinedSneakyUpgrade ? 90 : 60);

    //Pipe slots
      for(int pipeSlot = 0; pipeSlot < 8; pipeSlot++){
        dummy.addRestrictedSlot(pipeSlot, inv, 8 + pipeSlot * 18, 18, new ISlotCheck() {
        @Override
        public boolean isStackAllowed(ItemStack itemStack) {
          if(itemStack == null) return false;
          if(itemStack.getItem() == LogisticsPipes.UpgradeItem) {
            if(!LogisticsPipes.UpgradeItem.getUpgradeForItem(itemStack, null).isAllowed(pipe)) return false;
View Full Code Here

      }
      }, 1);
     
    int y = isCombinedSneakyUpgrade ? 58 : 100000;
    for(int pipeSlot = 0; pipeSlot < 9; pipeSlot++){
        dummy.addRestrictedSlot(pipeSlot, sneakyInv, 8 + pipeSlot * 18, y, new ISlotCheck() {
        @Override
        public boolean isStackAllowed(ItemStack itemStack) {
          if(itemStack == null) return false;
          if(itemStack.getItem() == LogisticsPipes.UpgradeItem) {
            IPipeUpgrade upgrade = LogisticsPipes.UpgradeItem.getUpgradeForItem(itemStack, null);
View Full Code Here

      }
    });
    dummy.addNormalSlotsForPlayerInventory(0, 0);
    // TAB_1 SLOTS
    for(int pipeSlot = 0; pipeSlot < 9; pipeSlot++) {
        dummy.addRestrictedSlot(pipeSlot, pipe.getUpgradeManager().getInv(), 8 + pipeSlot * 18, 18, new ISlotCheck() {
        @Override
        public boolean isStackAllowed(ItemStack itemStack) {
          if(itemStack == null) return false;
          if(itemStack.getItem() == LogisticsPipes.UpgradeItem) {
            if(!LogisticsPipes.UpgradeItem.getUpgradeForItem(itemStack, null).isAllowed(pipe)) return false;
View Full Code Here

          return true;
        }
        });
      }
    for(int pipeSlot = 0; pipeSlot < 9; pipeSlot++) {
        dummy.addRestrictedSlot(pipeSlot, pipe.getUpgradeManager().getSneakyInv(), 8 + pipeSlot * 18, 48, new ISlotCheck() {
        @Override
        public boolean isStackAllowed(ItemStack itemStack) {
          if(itemStack == null) return false;
          if(itemStack.getItem() == LogisticsPipes.UpgradeItem) {
            IPipeUpgrade upgrade = LogisticsPipes.UpgradeItem.getUpgradeForItem(itemStack, null);
View Full Code Here

        if(itemStack.getItemDamage() != LogisticsItemCard.SEC_CARD) return false;
        if(!SimpleServiceLocator.securityStationManager.isAuthorized(UUID.fromString(itemStack.getTagCompound().getString("UUID")))) return false;
        return true;
      }
      }, 1);
      dummy.addRestrictedSlot(0, pipe.container.logicController.diskInv, 14, 36, LogisticsPipes.LogisticsItemDisk);
    return dummy;
  }
 
  @Override
  public GuiProvider template() {
View Full Code Here

  @Override
  public DummyContainer getContainer(EntityPlayer player) {
    LogisticsSecurityTileEntity tile = this.getTile(player.getEntityWorld(), LogisticsSecurityTileEntity.class);
    if(tile == null) return null;
    DummyContainer dummy = new DummyContainer(player, null, tile);
    dummy.addRestrictedSlot(0, tile.inv, 50, 50, (Item)null);
    dummy.addNormalSlotsForPlayerInventory(10, 210);
    return dummy;
  }

  @Override
View Full Code Here

    if(tile == null) return null;
    DummyContainer dummy = new DummyContainer(player, tile, tile);
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < 3; j++) {
        final int slotNumber = i * 3 + j;
        dummy.addRestrictedSlot(slotNumber,tile, 44 + (j * 18), 17 + (i * 18), new ISlotCheck() {
          @Override
          public boolean isStackAllowed(ItemStack itemStack) {
            return tile.checkSlot(itemStack, slotNumber);
          }
        });
View Full Code Here

            return tile.checkSlot(itemStack, slotNumber);
          }
        });
      }
    }
    dummy.addRestrictedSlot(9, tile, 107, 17, Items.iron_ingot);
    dummy.addRestrictedSlot(10, tile, 141, 47, (Item)null);
    dummy.addRestrictedSlot(11, tile, 9, 9, new ISlotCheck() {
      @Override
      public boolean isStackAllowed(ItemStack itemStack) {
        return tile.getRecipeForTaget(itemStack) != null && tile.areStacksEmpty();
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.