Package logisticspipes.utils.gui

Examples of logisticspipes.utils.gui.DummyContainer


  private PipeItemsProviderLogistics logic;
 
  public GuiProviderPipe(IInventory playerInventory, IInventory dummyInventory, PipeItemsProviderLogistics logic) {
    super(null);
   
    DummyContainer dummy = new DummyContainer(playerInventory, dummyInventory);
    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;
   
    this.logic = logic;
View Full Code Here


public class GuiFluidBasic extends LogisticsBaseGuiScreen {

  public GuiFluidBasic(EntityPlayer player, IInventory inventory) {
    super(180, 130, 0, 0);
    DummyContainer dummy = new DummyContainer(player.inventory, inventory);
    dummy.addFluidSlot(0, inventory, 28, 13);
    dummy.addNormalSlotsForPlayerInventory(10, 45);
    this.inventorySlots = dummy;
  }
View Full Code Here

  private final LogisticsPowerJunctionTileEntity junction;
 
  public GuiPowerJunction(EntityPlayer player, LogisticsPowerJunctionTileEntity junction) {
    super(176, 166, 0, 0);
    DummyContainer dummy = new DummyContainer(player, null, junction);
    dummy.addNormalSlotsForPlayerInventory(8, 80);
    this.inventorySlots = dummy;
    this.junction = junction;
  }
View Full Code Here

public class ItemAmountSignCreationGui extends LogisticsBaseGuiScreen {
 
  public ItemAmountSignCreationGui(EntityPlayer player, CoreRoutedPipe pipe, ForgeDirection dir) {
    super(180, 125, 0, 0);
    ItemAmountPipeSign sign = ((ItemAmountPipeSign)pipe.getPipeSign(dir));
    DummyContainer dummy = new DummyContainer(player.inventory, sign.itemTypeInv);
    dummy.addDummySlot(0, 10, 13);
    dummy.addNormalSlotsForPlayerInventory(10, 40);
    this.inventorySlots = dummy;
  }
View Full Code Here

 
  public GuiFluidSupplierMk2Pipe(IInventory playerInventory, IInventory dummyInventory, PipeFluidSupplierMk2 logic) {
    super(null);
   
   
    DummyContainer dummy = new DummyContainer(playerInventory, dummyInventory);
    dummy.addNormalSlotsForPlayerInventory(13, 92);
   
   
    dummy.addFluidSlot(0, dummyInventory, 60, 18);         
   
    this.inventorySlots = dummy;

    this.logic = logic;
    xSize = 184;
View Full Code Here

  private int fuzzyPanelHover     = -1;
  private int fuzzyPanelHoverTime = 0;
 
  public GuiLogisticsCraftingTable(EntityPlayer player, LogisticsCraftingTableTileEntity crafter) {
    super(176, 218, 0, 0);
    DummyContainer dummy = new DummyContainer(player.inventory, crafter.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, crafter.resultInv, 125, 28);
    for(int y=0;y<2;y++) {
      for(int x=0;x<9;x++) {
        dummy.addNormalSlot(y*9 + x, crafter.inv, 8 + x*18, 80 + y*18);
      }
    }
    dummy.addNormalSlotsForPlayerInventory(8, 135);
    this.inventorySlots = dummy;
    _crafter = crafter;
  }
View Full Code Here

  @Override
  public DummyContainer getContainer(EntityPlayer player) {
    LogisticsTileGenericPipe tile = this.getPipe(player.getEntityWorld());
    if(tile == null || !(tile.pipe instanceof CoreRoutedPipe)) return null;
    final CoreRoutedPipe pipe = (CoreRoutedPipe) tile.pipe;
    DummyContainer dummy = new DummyContainer(player, null, pipe.getUpgradeManager().getGuiController(), new IGuiOpenControler() {
      //Network Statistics
      @Override
      public void guiOpenedByPlayer(EntityPlayer player) {
        pipe.playerStartWatching(player, 0);
      }
     
      @Override
      public void guiClosedByPlayer(EntityPlayer player) {
        pipe.playerStopWatching(player, 0);
      }
    });
    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;
          } else {
            return false;
          }
          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);
            if(!(upgrade instanceof SneakyUpgrade)) return false;
            if(!upgrade.isAllowed(pipe)) return false;
          } else {
            return false;
          }
          return true;
        }
        });
      }
    // TAB_2 SLOTS
      dummy.addStaticRestrictedSlot(0, pipe.getUpgradeManager().getSecInv(), 8 + 8 * 18, 18, 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);
      dummy.addRestrictedSlot(0, pipe.container.logicController.diskInv, 14, 36, LogisticsPipes.LogisticsItemDisk);
    return dummy;
  }
View Full Code Here

  @Override
  public DummyContainer getContainer(EntityPlayer player) {
    ModuleApiaristAnalyser module = this.getLogisticsModule(player.getEntityWorld(), ModuleApiaristAnalyser.class);
    if(module == null) return null;
    return new DummyContainer(player.inventory, null);
  }
View Full Code Here

  public LogicLayoutGui(LogicController controller, EntityPlayer player) {
    super(256, 202 + 90, 0, 0);
    this.controller = controller;
    this.guiMapY = -200;
    Mouse.getDWheel(); // Reset DWheel on GUI open
    DummyContainer dummy = new DummyContainer(player.inventory, null);
    dummy.addNormalSlotsForPlayerInventory(50, 205);
    this.inventorySlots = dummy;
  }
View Full Code Here

  }

  @Override
  public DummyContainer getContainer(EntityPlayer player) {
    ModuleFluidSupplier module = this.getLogisticsModule(player.getEntityWorld(), ModuleFluidSupplier.class);
    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.