Package logisticspipes.utils.gui

Examples of logisticspipes.utils.gui.DummyContainer


public class GuiExtractor extends ModuleBaseGui {

  private final LogisticsSneakyDirectionModule _directionReceiver;
 
  public GuiExtractor(IInventory playerInventory, LogisticsSneakyDirectionModule directionReceiver) {
    super(new DummyContainer(playerInventory, null), directionReceiver);
    _directionReceiver = directionReceiver;
    xSize = 160;
    ySize = 200;
  }
View Full Code Here


  }
 
  public GuiAdvancedExtractor(IInventory playerInventory, ModuleAdvancedExtractor advancedExtractor) {
    super(null, advancedExtractor);
    _advancedExtractor = advancedExtractor;
    DummyContainer dummy = new DummyContainer(playerInventory, _advancedExtractor.getFilterInventory());
    dummy.addNormalSlotsForPlayerInventory(8, 60);

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

    this.inventorySlots = dummy;
    xSize = 175;
    ySize = 142;
View Full Code Here

  protected boolean clickWasButton = false;
 
 
  public GuiSecurityStation(LogisticsSecurityTileEntity tile, EntityPlayer player) {
    super(280, 260, 0, 0);
    DummyContainer dummy = new DummyContainer(player.inventory, tile.inv);
    dummy.addRestrictedSlot(0, tile.inv, 82, 141, (Item)null);
    dummy.addNormalSlotsForPlayerInventory(10, 175);
    this.inventorySlots = dummy;
    _tile = tile;
    authorized = SimpleServiceLocator.securityStationManager.isAuthorized(tile.getSecId());
  }
View Full Code Here

    if(GuiOrderer.cachetime + 100 < System.currentTimeMillis()) {
      dimension = MainProxy.getDimensionForWorld(_table.getWorld());
    } else {
      dimension = GuiOrderer.dimensioncache;
    }
    DummyContainer dummy = new DummyContainer(entityPlayer.inventory, _table.matrix);
    int i = 0;
    for(int y = 0;y < 3;y++) {
      for(int x = 0;x < 9;x++) {
        dummy.addNormalSlot(i++, _table.inv, guiLeft + (x * 18) + 20, guiTop + (y * 18) + 80);
      }
    }
    i = 0;
    for(int y = 0;y < 3;y++) {
      for(int x = 0;x < 3;x++) {
        dummy.addDummySlot(i++, guiLeft + (x * 18) + 20, guiTop + (y * 18) + 15);
      }
    }
    dummy.addCallableSlotHandler(0, _table.resultInv, guiLeft + 101, guiTop + 33, new ISlotClick() {
      @Override
      public ItemStack getResultForClick() {
        return _table.getResultForClick();
      }
    });
    dummy.addNormalSlot(0, _table.toSortInv, guiLeft + 164, guiTop + 51);
    dummy.addNormalSlot(0, _table.diskInv, guiLeft + 164, guiTop + 25);
    dummy.addNormalSlotsForPlayerInventory(20, 150);
    this.inventorySlots = dummy;
    refreshItems();
  }
View Full Code Here

  public GuiProvider(IInventory playerInventory, ModuleProvider provider) {
    super(null, provider);
    _playerInventory = playerInventory;
    _provider = provider;
   
    DummyContainer dummy = new DummyContainer(_playerInventory, _provider.getFilterInventory());
    dummy.addNormalSlotsForPlayerInventory(18, 97);
   
    int xOffset = 72;
    int yOffset = 18;
   
    for (int row = 0; row < 3; row++){
      for (int column = 0; column < 3; column++){
        dummy.addDummySlot(column + row * 3, xOffset + column * 18, yOffset + row * 18);         
      }
    }
   
      this.inventorySlots = dummy;
    xSize = 194;
View Full Code Here

 
  public GuiHUDSettings(EntityPlayer player, int slot) {
    super(180, 160, 0, 0);
    this.slot = slot;
    this.player = player;
    DummyContainer dummy = new DummyContainer(player.inventory, null);
    dummy.addRestrictedHotbarForPlayerInventory(10, 134);
    dummy.addRestrictedArmorForPlayerInventory(10, 65);
    this.inventorySlots = dummy;
  }
View Full Code Here

  private final CoreRoutedPipe  pipe;
 
  public GuiPipeController(final EntityPlayer player, final CoreRoutedPipe pipe) {
    super(180, 220, 0, 0);
    this.pipe = pipe;
    DummyContainer dummy = new DummyContainer(player, null, pipe.getUpgradeManager().getGuiController());
    dummy.addNormalSlotsForPlayerInventory(10, 135);
   
    // TAB_1 SLOTS
    for(int pipeSlot = 0; pipeSlot < 9; pipeSlot++) {
      TAB_SLOTS_1_1.add(dummy.addRestrictedSlot(pipeSlot, pipe.getUpgradeManager().getInv(), 10 + pipeSlot * 18, 42, 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;
          } else {
            return false;
          }
          return true;
        }
      }));
    }
   
    for(int pipeSlot = 0; pipeSlot < 9; pipeSlot++) {
      TAB_SLOTS_1_2.add(dummy.addRestrictedSlot(pipeSlot, pipe.getUpgradeManager().getSneakyInv(), 10 + pipeSlot * 18, 78, 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);
            if(!(upgrade instanceof SneakyUpgrade)) return false;
            if(!upgrade.isAllowed(pipe)) return false;
          } else {
            return false;
          }
          return true;
        }
      }));
    }
   
    // TAB_2 SLOTS
    TAB_SLOTS_2.add(dummy.addStaticRestrictedSlot(0, pipe.getUpgradeManager().getSecInv(), 10, 42, new ISlotCheck() {
      @Override
      public boolean isStackAllowed(ItemStack itemStack) {
        if(itemStack == null) return false;
        if(itemStack.getItem() != LogisticsPipes.LogisticsItemCard) return false;
        if(itemStack.getItemDamage() != LogisticsItemCard.SEC_CARD) return false;
        if(!SimpleServiceLocator.securityStationManager.isAuthorized(UUID.fromString(itemStack.getTagCompound().getString("UUID")))) return false;
        return true;
      }
    }, 1));
   
    TAB_SLOTS_4.add(dummy.addRestrictedSlot(0, pipe.container.logicController.diskInv, 14, 36, LogisticsPipes.LogisticsItemDisk));
   
    this.inventorySlots = dummy;
  }
View Full Code Here

public class GuiCCBasedQuickSort extends ModuleBaseGui {
 
  private ModuleCCBasedQuickSort _sortModule;
 
  public GuiCCBasedQuickSort(IInventory playerInventory, ModuleCCBasedQuickSort sortModule) {
    super(new DummyContainer(playerInventory, null), sortModule);
    _sortModule = sortModule;
    xSize = 120;
    ySize = 60;
  }
View Full Code Here

  }
 
  public GuiItemSink(IInventory playerInventory, ModuleItemSink itemSink) {
    super(null, itemSink);
    _itemSink = itemSink;
    DummyContainer dummy = new DummyContainer(playerInventory, _itemSink.getFilterInventory());
    dummy.addNormalSlotsForPlayerInventory(8, 60);

    //Pipe slots
      for(int pipeSlot = 0; pipeSlot < 9; pipeSlot++){
        dummy.addDummySlot(pipeSlot, 8 + pipeSlot * 18, 18);
      }
     
      this.inventorySlots = dummy;
    xSize = 175;
    ySize = 142;
View Full Code Here

public class GuiApiaristAnalyser extends ModuleBaseGui {

  private final ModuleApiaristAnalyser module; 
 
  public GuiApiaristAnalyser(ModuleApiaristAnalyser module, IInventory playerInventory) {
    super(new DummyContainer(playerInventory,null), module);
    this.module = module;
    xSize = 120;
    ySize = 60;
  }
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.