package boilerplate.steamapi.machines;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;

import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;

public class BloomeryRecipes
{
    private static final BloomeryRecipes smeltingBase = new BloomeryRecipes();
    /** The list of smelting results. */
    private Map<ItemStack, ItemStack> smeltingList = new HashMap<ItemStack, ItemStack>();

    /**
     * Used to call methods addSmelting and getSmeltingResult.
     */
    public static BloomeryRecipes smelting()
    {
        return smeltingBase;
    }

    private BloomeryRecipes()
    {
        this.addBloomeryBlockRecipe(Blocks.iron_ore, new ItemStack(Items.apple));
    }

    public void addBloomeryBlockRecipe(Block input, ItemStack result)
    {
        this.addBloomeryItemRecipe(Item.getItemFromBlock(input), result);
    }

    public void addBloomeryItemRecipe(Item input, ItemStack result)
    {
        this.addBloomeryItemStackRecipe(new ItemStack(input, 1, 32767), result);
    }

    public void addBloomeryItemStackRecipe(ItemStack input, ItemStack result)
    {
        this.smeltingList.put(input, result);
    }

    /**
     * Returns the smelting result of an item.
     */
    public ItemStack getSmeltingResult(ItemStack stack)
    {
        Iterator<?> iterator = this.smeltingList.entrySet().iterator();
        Entry<?, ?> entry;

        do
        {
            if (!iterator.hasNext())
            {
                return null;
            }

            entry = (Entry<?, ?>)iterator.next();
        }
        while (!this.func_151397_a(stack, (ItemStack)entry.getKey()));

        return (ItemStack)entry.getValue();
    }

    private boolean func_151397_a(ItemStack p_151397_1_, ItemStack p_151397_2_)
    {
        return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage());
    }

    public Map<ItemStack, ItemStack> getSmeltingList()
    {
        return this.smeltingList;
    }
}
@@ -1293,24 +1293,25 @@
 lt);%0A    %7D%0A%0A
+%0A
     /**%0A    
@@ -1410,21 +1410,27 @@
 emStack 
-stack
+p_151395_1_
 )%0A    %7B%0A
@@ -1449,11 +1449,8 @@
 ator
-%3C?%3E
  ite
@@ -1511,22 +1511,16 @@
    Entry
-%3C?, ?%3E
  entry;%0A
@@ -1666,14 +1666,8 @@
 ntry
-%3C?, ?%3E
 )ite
@@ -1729,13 +1729,19 @@
 7_a(
-stack
+p_151395_1_
 , (I

Modify BloomeryRecipes