Package buildcraft.silicon

Examples of buildcraft.silicon.TileAssemblyTable


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

    TileAssemblyTable table = (TileAssemblyTable) tile;

    //current pipe inputs/outputs
    final ItemIdentifierInventory inputs = new ItemIdentifierInventory(inventory.getSizeInventory() - 2, "AssemblyTableDummyInv", 64, false);
    for(int i = 0; i< inventory.getSizeInventory() - 2; i++)
      inputs.setInventorySlotContents(i, inventory.getIDStackInSlot(i));
    ItemStack output = inventory.getStackInSlot(inventory.getSizeInventory() - 2);

    //see if there's a recipe planned in the table that matches the current pipe settings, if yes take the next, otherwise take the first
    FlexibleRecipe<ItemStack> firstRecipe = null;
    FlexibleRecipe<ItemStack> nextRecipe = null;
    boolean takeNext = false;
    for (IFlexibleRecipe<ItemStack> r : AssemblyRecipeManager.INSTANCE.getRecipes()) {
      if(!(r instanceof FlexibleRecipe)) continue;
      if(!((FlexibleRecipe<ItemStack>)r).inputFluids.isEmpty()) continue;
      if(table.isPlanned(r)) {
        if(firstRecipe == null) {
          firstRecipe = (FlexibleRecipe<ItemStack>) r;
        }
        if(takeNext) {
          nextRecipe = (FlexibleRecipe<ItemStack>) r;
View Full Code Here


      Block nearbyBlock = robot.worldObj.getBlock(index.x, index.y, index.z);
      int nearbyMeta = robot.worldObj.getBlockMetadata(index.x, index.y, index.z);

      if (nearbyBlock instanceof BlockLaserTable && nearbyMeta == 0) {
        TileAssemblyTable f = (TileAssemblyTable) robot.worldObj.getTileEntity(index.x, index.y, index.z);

        // TODO: check if assembly table has some empty slots

        return f;
      }
View Full Code Here

TOP

Related Classes of buildcraft.silicon.TileAssemblyTable

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.