Package logisticspipes.modules.abstractmodules

Examples of logisticspipes.modules.abstractmodules.LogisticsModule


          GL11.glColor4b((byte)127, (byte)127, (byte)127, (byte)127)
        }
    GL11.glTranslatef(0.0F, 0.0F,(float) (-0.00005F * distance));
    super.renderHeadUpDisplay(distance, day, mc, config);
    if(selected != -1) {
      LogisticsModule selectedmodule = module.getSubModule(selected);
      if(selectedmodule == null) return;
     
          GL11.glColor4b((byte)127, (byte)127, (byte)127, (byte)64);
      BasicGuiHelper.drawGuiBackGround(mc, -23, -35, 45, 45, 0, false);
          GL11.glColor4b((byte)127, (byte)127, (byte)127, (byte)127)
View Full Code Here


  }
 
  private void moduleClicked(int number) {
    selected = number;
    if(selected != -1) {
      LogisticsModule selectedmodule = module.getSubModule(selected);
      if(selectedmodule instanceof IHUDModuleHandler) {
        ((IHUDModuleHandler)selectedmodule).startHUDWatching();
      }
    }
  }
View Full Code Here

    }
  }
 
  private void resetSelection() {
    if(selected != -1) {
      LogisticsModule selectedmodule = module.getSubModule(selected);
      if(selectedmodule instanceof IHUDModuleHandler) {
        ((IHUDModuleHandler)selectedmodule).stopHUDWatching();
      }
    }
    selected = -1;
View Full Code Here

 
  @Override
  protected void actionPerformed(GuiButton guibutton) {
   
    if (guibutton.id >= 0 && guibutton.id <= 7){
      LogisticsModule module = _chassiPipe.getLogisticsModule().getSubModule(guibutton.id);
      if (module != null){
        final ModernPacket packet = PacketHandler
            .getPacket(ChassisGUI.class).setButtonID(guibutton.id)
            .setPosX(_chassiPipe.getX())
            .setPosY(_chassiPipe.getY())
View Full Code Here

  public void getAllItems(Map<ItemIdentifier, Integer> list, List<IFilter> filter) {
    if (!isEnabled()){
      return;
    }
    for (int i = 0; i < this.getChassiSize(); i++){
      LogisticsModule x = _module.getSubModule(i);
      if (x instanceof ILegacyActiveModule) {
        ILegacyActiveModule y = (ILegacyActiveModule)x;
        y.getAllItems(list, filter);
      }
    }
View Full Code Here

  @Override
  public void setTile(TileEntity tile) {
    super.setTile(tile);
    for (int i = 0; i < _moduleInventory.getSizeInventory(); i++) {
      LogisticsModule current = _module.getModule(i);
      if(current != null) {
        current.registerPosition(ModulePositionType.SLOT, i);
      }
    }
  }
View Full Code Here

  public Set<ItemIdentifier> getSpecificInterests() {
    Set<ItemIdentifier> l1 = new TreeSet<ItemIdentifier>();
    //if we don't have a pointed inventory we can't be interested in anything
    if(getSneakyInventory(false) == null) return l1;
    for (int moduleIndex = 0; moduleIndex < this.getChassiSize(); moduleIndex++){
      LogisticsModule module = _module.getSubModule(moduleIndex);
      if(module!=null && module.interestedInAttachedInventory()) {
        IInventoryUtil inv = getSneakyInventory(false);
        Set<ItemIdentifier> items = inv.getItems();
        l1.addAll(items);

        //also add tag-less variants ... we should probably add a module.interestedIgnoringNBT at some point
        for(ItemIdentifier id:items) {
          l1.add(id.getIgnoringNBT());
        }

        boolean modulesInterestedInUndamged=false;
        for (int i = 0; i < this.getChassiSize(); i++) {
          if( _module.getSubModule(moduleIndex).interestedInUndamagedID()){
            modulesInterestedInUndamged=true;
            break;
          }
        }
        if(modulesInterestedInUndamged) {
          for(ItemIdentifier id:items){ 
            l1.add(id.getUndamaged());
          }
        }
        break; // no need to check other modules for interest in the inventory, when we know that 1 already is.
      }
    }
    for (int i = 0; i < this.getChassiSize(); i++){
      LogisticsModule module = _module.getSubModule(i);
      if(module!=null) {
        Collection<ItemIdentifier> current = module.getSpecificInterests();
        if(current!=null)
          l1.addAll(current);
      }
    }
    return l1;
View Full Code Here

  @Override
  public boolean hasGenericInterests() {
    if(getRealInventory() == null) return false;
    for (int i = 0; i < this.getChassiSize(); i++){
      LogisticsModule x = _module.getSubModule(i);
     
      if(x!=null && x.hasGenericInterests())
        return true;     
    }
    return false;
  }
View Full Code Here

  }

  @Override
  public CraftingTemplate addCrafting(ItemIdentifier toCraft) {
    for (int i = 0; i < this.getChassiSize(); i++){
      LogisticsModule x = _module.getSubModule(i);
     
      if(x!=null && x instanceof ICraftItems) {       
        if(((ICraftItems)x).canCraft(toCraft)) {
          return ((ICraftItems)x).addCrafting(toCraft);
        }
View Full Code Here

  @Override
  public List<ItemIdentifierStack> getCraftedItems() {
    List<ItemIdentifierStack> craftables = null;
    for (int i = 0; i < this.getChassiSize(); i++) {
      LogisticsModule x = _module.getSubModule(i);
     
      if(x!=null && x instanceof ICraftItems) {
        if(craftables ==null) {
          craftables = new LinkedList<ItemIdentifierStack> ();
        }
View Full Code Here

TOP

Related Classes of logisticspipes.modules.abstractmodules.LogisticsModule

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.