Exemplo n.º 1
0
  public static void oreCompressedCraft(Item item, Block block, Block ore, float exp) {

    if (ore != null) GameRegistry.addSmelting(ore, new ItemStack(item), exp);

    GameRegistry.addRecipe(new ItemStack(block), new Object[] {"###", "###", "###", '#', item});
    GameRegistry.addShapelessRecipe(new ItemStack(item, 9), new Object[] {block});
  }
 public static void addRecipe(
     ItemFoodAppleMagic apple, ItemStack ingredient, boolean isExpensive) {
   int refund = 8;
   if (isExpensive) {
     GameRegistry.addRecipe(
         new ItemStack(apple), "lll", "lal", "lll", 'l', ingredient, 'a', Items.APPLE);
   } else {
     GameRegistry.addShapelessRecipe(new ItemStack(apple), ingredient, Items.APPLE);
     refund = 1;
   }
   GameRegistry.addSmelting(
       apple, new ItemStack(ingredient.getItem(), refund, ingredient.getMetadata()), smeltexp);
 }
Exemplo n.º 3
0
  public static void makeRecipes() {

    // 2 items shapeless is 1 block

    GameRegistry.addShapelessRecipe(
        new ItemStack(MyBlocks.block_light), MyItems.item_ring, MyItems.item_ring);

    // 4 items in pattern results in 3 blocks
    GameRegistry.addRecipe(
        new ItemStack(MyBlocks.block_light, 3), "## ", " ##", '#', MyItems.item_ring);

    // Lapiz in furnace = item_ring
    // last argument is XP, iron (0.7), gold/diamond/em ore (1) beef/meat (0.35)
    GameRegistry.addSmelting(
        new ItemStack(Items.dye, 1, 4), new ItemStack(MyItems.item_ring), 0.5f);
  }
Exemplo n.º 4
0
  private static void addFurnaceRecipe(ItemStack result, ItemStack input, int xp) {

    furnace.put(result.getUnlocalizedName(), input);

    GameRegistry.addSmelting(input, result, xp);
  }