Package buildcraft.silicon

Examples of buildcraft.silicon.TileAdvancedCraftingTable$CraftingGrid


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

    TileAdvancedCraftingTable bench = (TileAdvancedCraftingTable) tile;
    ItemStack result = bench.getOutputSlot().getStackInSlot(0);

    if (result == null)
      return false;

    inventory.setInventorySlotContents(9, result);

    // Import
    for (int i = 0; i < bench.getCraftingSlots().getSizeInventory(); i++) {
      if (i >= inventory.getSizeInventory() - 2) {
        break;
      }
      final ItemStack newStack = bench.getCraftingSlots().getStackInSlot(i) == null ? null : bench.getCraftingSlots().getStackInSlot(i).copy();
      inventory.setInventorySlotContents(i, newStack);
    }

    // Compact
    for (int i = 0; i < inventory.getSizeInventory() - 2; i++) {
View Full Code Here


   * @param player
   * @param packet1
   */
  private void onAdvancedWorkbenchSet(EntityPlayer player, PacketSlotChange packet1) {

    TileAdvancedCraftingTable tile = getAdvancedWorkbench(player.worldObj, packet1.posX, packet1.posY, packet1.posZ);
    if (tile == null) {
      return;
    }

    tile.updateCraftingMatrix(packet1.slot, packet1.stack);
  }
View Full Code Here

TOP

Related Classes of buildcraft.silicon.TileAdvancedCraftingTable$CraftingGrid

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.