Package logisticspipes.utils.gui

Examples of logisticspipes.utils.gui.DummyContainer


  @Override
  public Container getContainer(EntityPlayer player) {
    TileEntity pipe = this.getTile(player.getEntityWorld(), TileEntity.class);
    if(pipe instanceof ILogicControllerTile) {
      LogicController controller = ((ILogicControllerTile)pipe).getLogicController();
      DummyContainer dummy = new DummyContainer(player.inventory, null);
      dummy.addNormalSlotsForPlayerInventory(50, 190);
      return dummy;
    }
    return null;
  }
View Full Code Here


    return new GuiSupplierPipe(player.inventory, ((ModuleActiveSupplier)module).getDummyInventory(), (ModuleActiveSupplier) module, false, new int[9]);
  }

  @Override
  public DummyContainer getContainer(EntityPlayer player) {
    DummyContainer dummy = new DummyModuleContainer(player, getInvSlot());
    if(!(((DummyModuleContainer)dummy).getModule() instanceof ModuleActiveSupplier)) return null;
    ((DummyModuleContainer)dummy).setInventory(((ModuleActiveSupplier)((DummyModuleContainer)dummy).getModule()).getDummyInventory());
    dummy.addNormalSlotsForPlayerInventory(8, 60);
   
    //Pipe slots
      for(int pipeSlot = 0; pipeSlot < 9; pipeSlot++){
        dummy.addDummySlot(pipeSlot, 8 + pipeSlot * 18, 18);
      }
      return dummy;
  }
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;
  }
View Full Code Here

  @Override
  public DummyContainer getContainer(EntityPlayer player) {
    LogisticsPowerJunctionTileEntity tile = this.getTile(player.getEntityWorld(), LogisticsPowerJunctionTileEntity.class);
    if(tile == null) return null;
    DummyContainer dummy = new DummyContainer(player, null, tile);
    dummy.addNormalSlotsForPlayerInventory(8, 80);
    return dummy;
  }
View Full Code Here

  @Override
  public DummyContainer getContainer(EntityPlayer player) {
    final LogisticsSolderingTileEntity tile = this.getTile(player.worldObj, LogisticsSolderingTileEntity.class);
    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);
          }
        });
      }
    }
    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();
      }
    });
    dummy.addNormalSlotsForPlayerInventory(8, 84);
    return dummy;
  }
View Full Code Here

  @Override
  public DummyContainer getContainer(EntityPlayer player) {
    LogisticsPowerProviderTileEntity tile = this.getTile(player.getEntityWorld(), LogisticsPowerProviderTileEntity.class);
    if(tile == null) return null;
    DummyContainer dummy = new DummyContainer(player, null, tile);
    dummy.addNormalSlotsForPlayerInventory(8, 80);
    return dummy;
  }
View Full Code Here

  @Override
  public DummyContainer getContainer(EntityPlayer player) {
    LogisticsTileGenericPipe pipe = this.getPipe(player.getEntityWorld());
    if(pipe == null || !(pipe.pipe instanceof CoreRoutedPipe)) return null;
    ItemAmountPipeSign sign = ((ItemAmountPipeSign)((CoreRoutedPipe)pipe.pipe).getPipeSign(dir));
    DummyContainer dummy = new DummyContainer(player.inventory, sign.itemTypeInv);
    dummy.addDummySlot(0, 0, 0);
    dummy.addNormalSlotsForPlayerInventory(0, 0);
    return dummy;
  }
View Full Code Here

  @Override
  public DummyContainer getContainer(EntityPlayer player) {
    LogisticsCraftingTableTileEntity tile = this.getTile(player.getEntityWorld(), LogisticsCraftingTableTileEntity.class);
    if(tile == null) return null;
    DummyContainer dummy = new DummyContainer(player.inventory, tile.matrix);

    for(int X=0;X<3;X++) {
      for(int Y=0;Y<3;Y++) {
        dummy.addDummySlot(Y*3 + X, 35 + X*18, 10 + Y*18);
      }
    }
    dummy.addUnmodifiableSlot(0, tile.resultInv, 125, 28);
    for(int Y=0;Y<2;Y++) {
      for(int X=0;X<9;X++) {
        dummy.addNormalSlot(Y*9 + X, tile.inv, 8 + X*18, 80 + Y*18);
      }
    }
    dummy.addNormalSlotsForPlayerInventory(8, 135);
    return dummy;
  }
View Full Code Here

  }

  @Override
  public DummyContainer getContainer(EntityPlayer player) {
    final CardManagmentInventory Cinv = new CardManagmentInventory();
    DummyContainer dummy = new DummyContainer(player, Cinv, new IGuiOpenControler() {
      @Override public void guiOpenedByPlayer(EntityPlayer player) {}
      @Override
      public void guiClosedByPlayer(EntityPlayer player) {
        Cinv.close(player,(int)player.posX, (int)player.posY, (int)player.posZ);
      }
    });
    for(int i=0;i<2;i++) {
      dummy.addRestrictedSlot(i, Cinv, 0, 0, LogisticsPipes.ModuleItem);
    }
    dummy.addRestrictedSlot(2, Cinv, 0, 0, new ISlotCheck() {
      @Override public boolean isStackAllowed(ItemStack itemStack) {return false;}
    });
    dummy.addRestrictedSlot(3, Cinv, 0, 0, LogisticsPipes.LogisticsItemCard);
    for(int i=4;i<10;i++) {
      dummy.addColorSlot(i, Cinv, 0, 0);
    }
    dummy.addNormalSlotsForPlayerInventory(0, 0);
    return dummy;
  }
View Full Code Here

  @Override
  public DummyContainer getContainer(EntityPlayer player) {
    LogisticsSimpleFilterModule module = this.getLogisticsModule(player.getEntityWorld(), LogisticsSimpleFilterModule.class);
    if(module == null) return null;
    DummyContainer dummy = new DummyContainer(player.inventory, module.getFilterInventory());
    dummy.addNormalSlotsForPlayerInventory(8, 60);

    //Pipe slots
      for(int pipeSlot = 0; pipeSlot < 9; pipeSlot++){
        dummy.addDummySlot(pipeSlot, 8 + pipeSlot * 18, 18);
      }
     
      return dummy;
  }
View Full Code Here

TOP

Related Classes of logisticspipes.utils.gui.DummyContainer

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.