Exemplo n.º 1
0
  /** Adds the ingot recipes to the CraftingManager. */
  public void addRecipes(CraftingManager par1CraftingManager) {
    for (int var2 = 0; var2 < this.recipeItems.length; ++var2) {
      Block var3 = (Block) this.recipeItems[var2][0];
      ItemStack var4 = (ItemStack) this.recipeItems[var2][1];
      par1CraftingManager.func_92103_a(
          new ItemStack(var3), new Object[] {"###", "###", "###", '#', var4});
      par1CraftingManager.func_92103_a(var4, new Object[] {"#", '#', var3});
    }

    par1CraftingManager.func_92103_a(
        new ItemStack(Item.ingotGold), new Object[] {"###", "###", "###", '#', Item.goldNugget});
    par1CraftingManager.func_92103_a(
        new ItemStack(Item.goldNugget, 9), new Object[] {"#", '#', Item.ingotGold});
  }
Exemplo n.º 2
0
  public void addRecipes(CraftingManager craftingmanager) {
    for (int i = 0; i < recipeItems[0].length; i++) {
      Object obj = recipeItems[0][i];
      for (int j = 0; j < recipeItems.length - 1; j++) {
        Item item = (Item) recipeItems[j + 1][i];
        craftingmanager.addRecipe(
            new ItemStack(item),
            new Object[] {
              recipePatterns[j], Character.valueOf('#'), Item.stick, Character.valueOf('X'), obj
            });
      }
    }

    craftingmanager.addRecipe(
        new ItemStack(Item.field_31022_bc),
        new Object[] {" #", "# ", Character.valueOf('#'), Item.ingotIron});
  }
Exemplo n.º 3
0
 public void a(IInventory iinventory) {
   this.resultInventory.setItem(0, CraftingManager.getInstance().craft(this.craftInventory));
 }
Exemplo n.º 4
0
 /** Adds the crafting recipes to the CraftingManager. */
 public void addRecipes(CraftingManager par1CraftingManager) {
   par1CraftingManager.addRecipe(
       new ItemStack(Block.chest), new Object[] {"###", "# #", "###", '#', Block.planks});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.enderChest),
       new Object[] {"###", "#E#", "###", '#', Block.obsidian, 'E', Item.eyeOfEnder});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.stoneOvenIdle),
       new Object[] {"###", "# #", "###", '#', Block.cobblestone});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.workbench), new Object[] {"##", "##", '#', Block.planks});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.sandStone), new Object[] {"##", "##", '#', Block.sand});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.sandStone, 4, 2), new Object[] {"##", "##", '#', Block.sandStone});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.sandStone, 1, 1),
       new Object[] {"#", "#", '#', new ItemStack(Block.stoneSingleSlab, 1, 1)});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.stoneBrick, 4), new Object[] {"##", "##", '#', Block.stone});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.fenceIron, 16), new Object[] {"###", "###", '#', Item.ingotIron});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.thinGlass, 16), new Object[] {"###", "###", '#', Block.glass});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.redstoneLampIdle, 1),
       new Object[] {" R ", "RGR", " R ", 'R', Item.redstone, 'G', Block.glowStone});
 }
 public void onCraftMatrixChanged(IInventory iinventory) {
   craftResult.setInventorySlotContents(
       0, CraftingManager.getInstance().findMatchingRecipe(craftMatrix));
 }
 /** Adds the crafting recipes to the CraftingManager. */
 public void addRecipes(CraftingManager par1CraftingManager) {
   par1CraftingManager.addRecipe(
       new ItemStack(Block.chest), new Object[] {"###", "# #", "###", '#', Block.planks});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.field_94347_ck),
       new Object[] {"#-", '#', Block.chest, '-', Block.tripWireSource});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.enderChest),
       new Object[] {"###", "#E#", "###", '#', Block.obsidian, 'E', Item.eyeOfEnder});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.furnaceIdle),
       new Object[] {"###", "# #", "###", '#', Block.cobblestone});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.workbench), new Object[] {"##", "##", '#', Block.planks});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.sandStone), new Object[] {"##", "##", '#', Block.sand});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.sandStone, 4, 2), new Object[] {"##", "##", '#', Block.sandStone});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.sandStone, 1, 1),
       new Object[] {"#", "#", '#', new ItemStack(Block.stoneSingleSlab, 1, 1)});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.field_94339_ct, 1, 1),
       new Object[] {"#", "#", '#', new ItemStack(Block.stoneSingleSlab, 1, 7)});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.field_94339_ct, 2, 2),
       new Object[] {"#", "#", '#', new ItemStack(Block.field_94339_ct, 1, 0)});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.stoneBrick, 4), new Object[] {"##", "##", '#', Block.stone});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.fenceIron, 16), new Object[] {"###", "###", '#', Item.ingotIron});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.thinGlass, 16), new Object[] {"###", "###", '#', Block.glass});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.redstoneLampIdle, 1),
       new Object[] {" R ", "RGR", " R ", 'R', Item.redstone, 'G', Block.glowStone});
   par1CraftingManager.addRecipe(
       new ItemStack(Block.beacon, 1),
       new Object[] {
         "GGG", "GSG", "OOO", 'G', Block.glass, 'S', Item.netherStar, 'O', Block.obsidian
       });
   par1CraftingManager.addRecipe(
       new ItemStack(Block.netherBrick, 1), new Object[] {"NN", "NN", 'N', Item.field_94584_bZ});
 }