public static Map mapEnchantmentData(int par0, ItemStack par1ItemStack)
    {
        Item var2 = par1ItemStack.getItem();
        HashMap var3 = null;
        Enchantment[] var4 = Enchantment.enchantmentsList;
        int var5 = var4.length;

        for (int var6 = 0; var6 < var5; ++var6)
        {
            Enchantment var7 = var4[var6];

            if (var7 != null && var7.canEnchantItem(par1ItemStack))
            {
                for (int var8 = var7.getMinLevel(); var8 <= var7.getMaxLevel(); ++var8)
                {
                    if (par0 >= var7.getMinEnchantability(var8) && par0 <= var7.getMaxEnchantability(var8))
                    {
                        if (var3 == null)
                        {
                            var3 = new HashMap();
                        }

                        var3.put(Integer.valueOf(var7.effectId), new EnchantmentData(var7, var8));
                    }
                }
            }
        }

        return var3;
    }