Package logisticspipes.blocks

Examples of logisticspipes.blocks.LogisticsSolderingTileEntity


    if(tile instanceof LogisticsPowerJunctionTileEntity) {
      LogisticsPowerJunctionTileEntity LPJTE = (LogisticsPowerJunctionTileEntity)tile;
      if(LPJTE.needMorePowerTriggerCheck) return true;
    }
    if(tile instanceof LogisticsSolderingTileEntity) {
      LogisticsSolderingTileEntity LSTE = (LogisticsSolderingTileEntity)tile;
      if(LSTE.hasWork) return true;
    }
    return false;
  }
View Full Code Here


  @Override
  public boolean importRecipe(TileEntity tile, ItemIdentifierInventory inventory) {
    if (!(tile instanceof LogisticsSolderingTileEntity))
      return false;

    LogisticsSolderingTileEntity station = (LogisticsSolderingTileEntity) tile;
    ItemStack result = station.getTargetForTaget();

    if (result == null)
      return false;

    inventory.setInventorySlotContents(9, result);

    // Import
    for (int i = 0; i < station.getRecipeForTaget().length; i++) {
      if (i >= inventory.getSizeInventory() - 2) {
        break;
      }
      final ItemStack newStack = station.getRecipeForTaget()[i] == null ? null : station.getRecipeForTaget()[i].copy();
      inventory.setInventorySlotContents(i, newStack);
    }

    inventory.compact_first(9);
   
View Full Code Here

    return new SolderingStationProgress(getId());
  }

  @Override
  public void processPacket(EntityPlayer player) {
    final LogisticsSolderingTileEntity tile = this.getTile(player.worldObj, LogisticsSolderingTileEntity.class);
    if(tile != null) {
      tile.progress = getInteger();
    }
  }
View Full Code Here

    return new SolderingStationHeat(getId());
  }

  @Override
  public void processPacket(EntityPlayer player) {
    final LogisticsSolderingTileEntity tile = this.getTile(player.worldObj, LogisticsSolderingTileEntity.class);
    if(tile != null) {
      int old = tile.heat;
      tile.heat = getInteger();
      if((tile.heat == 0 && old != 0) || (tile.heat != 0 && old == 0)) {
        player.worldObj.markBlockForUpdate(getPosX(), getPosY(), getPosZ());
View Full Code Here

    return new SolderingStationInventory(getId());
  }

  @Override
  public void processPacket(EntityPlayer player) {
    final LogisticsSolderingTileEntity tile = this.getTile(player.worldObj, LogisticsSolderingTileEntity.class);
    if(tile != null) {
      for(int i = 0; i < tile.getSizeInventory(); i++) {
        if(i >= getStackList().size()) break;
        ItemStack stack = getStackList().get(i);
        tile.setInventorySlotContents(i, stack);
      }
    }
  }
View Full Code Here

    super(id);
  }
 
  @Override
  public Object getClientGui(EntityPlayer player) {
    final LogisticsSolderingTileEntity tile = this.getTile(player.worldObj, LogisticsSolderingTileEntity.class);
    if(tile == null) return null;
    GuiSolderingStation gui = new GuiSolderingStation(player, tile);
    gui.inventorySlots = this.getContainer(player);
    return gui;
  }
View Full Code Here

    return gui;
  }

  @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

TOP

Related Classes of logisticspipes.blocks.LogisticsSolderingTileEntity

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.