I'd like to have an item enchanted with silk-touch, but of course the enchants are all random. Is there a combination of enchantment level and item material that would give me the best odds of getting the silk touch enchantment?
In more recent updates, you can see in advance what your enchantment will be (at least in part) AND it also randomizes after accepting an enchantment AND it allows the exchange to cherry pick enchantments.
By bringing a bunch of rubbish items to enchant in addition to your one diamond pickaxe will allow you to enchant the pickaxe only when it is silk touch. Via exchanging say an iron hoe with the pickaxe and lesser enchanting that instead will randomize again allowing you to try again with the pickaxe. Of course you would use levels to enchant the garbage items but doing lower enchantment will use less levels allowing for more tries.
So where you used to need 150/180 levels to try 6 diamond pickaxes you can look at dozens of tries for the same number of levels.
[Current status: Unfortunately, as of now (2015) these tables have not been updated for Minecraft 1.8, only 1.6.2 (2013). Version 1.8 changed enchanting so that when you enchant an item it only consumes up to three of your levels, not all of the levels required to permit the enchantment. This means that the XP cost tables are inaccurate.]
Stuart Pernsteiner's enchantment strategy guide is, or at least was, an excellent resource. It provides tables and charts which list the conditions for the minimum XP or item cost for a given enchantment. According to the table for Silk Touch, you want to be at level 30 to get the best chance per single enchantment, you should still expect to enchant an average of 6 tools before getting Silk Touch rather than another enchantment.
However, if you have plenty of materials you may wish to use levels which are more efficient in terms of XP required rather than tools enchanted, since higher levels require gathering more XP per level.
From looking at the Minecraft Wiki page on enchanting, it looks like the best chances of getting silk touch would come from:
Wood tool - levels 12-47 (8-78) Stone tool - levels 26-55 (16-92) Iron tool - levels 11-46 (7-77) Diamond tool - levels 19-51 (12-85) Gold tool - levels 3-41 (2-69)
The number in parentheses is the level range where you have any chance at all of getting Silk Touch. The level range outside of parentheses is where you have the maximum chance of getting Silk Touch.
Of course, even with that, you still don't have a very good chance of getting silk touch. Minecraft uses a weighting system to determine what enchantment(s) a tool gets.
Efficiency - 10 Silk Touch - 1 Unbreaking - 5 Fortune - 2
So, even in the proper tool/level ranges, you would still only have a 1/18 chance of getting Silk Touch. I had hoped there was a way to be in the range of Silk Touch, but out of the range of one or more other enchantments, but no such luck. They all overlap Silk Touch.
Silk Touch can occur within a
Modified Enchantment Level (MEL) of
25-75. The MEL is arrived at by the calculation
MEL = Enchantment Level + Random(0, Enchantablility) + 1
Enchantment Level is the number of experience levels spent to enchant the item and
Enchantability is determined by the material, thus:
Enchantability Armor Tool Wood N/A 15 Leather 15 N/A Stone N/A 5 Iron 9 14 Chain 12 N/A Diamond 10 10 Gold 25 22
The game then multiplies the MEL by a number ranging from .75 to 1.25 to get the final MEL. To find the range inside the parentheses, I multiplied the lower bound by 4/5, and the upper bound by 4/3. To find the range outside the parentheses, I did the opposite.
The best way to determine your chances of getting any enchantment at any level is to run the Minecraft Enchantment Simulator (which is posted on the wiki Enchanting page) in 'Graph Levels' mode. If you want small error bars, I suggest running it in chrome with a lot of simulations (warning: CPU intensive!)
It will do many trial simulations at every level using the same enchanting algorithm Minecraft does, and give you the results, which takes into account everything - including multiple enchantments.
For a diamond pickaxe, (which most people will try for, since once acquired it will last the longest) here are the probabilities to a pretty high certainty:
Here is the generated data for the above graph (Parameters: Diamond > Pickaxe > Graph Levels > SilkTouch I > 800 x 200 simulations > Show confidence intervals ):
9: (0+-0%) 10: (0+-0%) 11: (0+-0%) 12: (0+-0.1%) 13: (0+-0.2%) 14: (0+-0.3%) 15: (1+-0.4%) 16: (1+-0.4%) 17: (2+-0.5%) 18: (3+-0.6%) 19: (4+-0.8%) 20: (5+-0.7%) 21: (6+-0.9%) 22: (7+-0.8%) 23: (8+-0.9%) 24: (8+-0.9%) 25: (9+-0.9%) 26: (9+-0.9%) 27: (9+-1%) 28: (9+-1.1%) 29: (10+-1%) 30: (10+-1%) 31: (10+-1%) 32: (10+-1.1%) 33: (10+-1.1%) 34: (10+-1%) 35: (11+-1.1%) 36: (11+-1.1%) 37: (11+-1.1%) 38: (11+-1.1%) 39: (11+-1.1%) 40: (11+-1.1%) 41: (12+-1.1%) 42: (12+-1%) 43: (12+-1.1%) 44: (12+-1.1%) 45: (13+-1.1%) 46: (13+-1.1%) 47: (13+-1.2%) 48: (13+-1%) 49: (13+-1.1%) 50: (14+-1.1%)
You can easily do this yourself for any enchantment, tool, or material.