Package buildcraft.silicon

Examples of buildcraft.silicon.TileIntegrationTable


public abstract class IntegrationTableRecipe extends FlexibleRecipe<ItemStack> implements IIntegrationRecipe {

  @Override
  public final CraftingResult<ItemStack> craft(IFlexibleCrafter crafter, boolean preview) {
    TileIntegrationTable table = (TileIntegrationTable) crafter;

    ItemStack inputA;
    ItemStack inputB;

    if (preview) {
      inputA = table.getStackInSlot(TileIntegrationTable.SLOT_INPUT_A);
      inputB = table.getStackInSlot(TileIntegrationTable.SLOT_INPUT_B);

      if (inputA != null) {
        inputA = inputA.copy();
      }

      if (inputB != null) {
        inputB = inputB.copy();
      }
    } else {
      inputA = table.decrStackSize(TileIntegrationTable.SLOT_INPUT_A, 1);
      inputB = table.decrStackSize(TileIntegrationTable.SLOT_INPUT_B, 1);
    }

    return craft(table, preview, inputA, inputB);
  }
View Full Code Here

TOP

Related Classes of buildcraft.silicon.TileIntegrationTable

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.