User:AlphanumericSheepPig/sandbox

These are edits for the 1.3 updates.

Basic Mechanics
Whenever you place an eligible item on the Enchantment Table, the enchantment levels available are randomly generated for each slot using the formula below. The enchantment level is dependent upon the number of nearby bookshelves, which is capped at 15 (but was 30 prior to the 1.3 update), as well as two random integers. The placement of the bookshelves is important, and is described in the next section. The enchantment level is calculated from the following formula:


 * Enchantment level = random(1,8) + (b/2) + random(0,b),

where b is the number of nearby bookshelves, and random(x,y) generates a uniformly distributed random integer between x and y inclusive.

When an item is placed on the enchanting table, a different level is calculated for each of the three slots, with new random variables rolled for each slot. Each level is then further modified depending on which slot it is to be displayed in. The modifications are as follows:


 * Top slot: The level on offer will be one third (rounded down) of the calculated level, unless it works out to 0, in which case the level offered will be 1.
 * Middle slot: The level on offer will be two thirds (rounded down) of the calculated level.
 * Bottom slot: The level on offer will be whichever is greatest between the calculated level and twice the number of bookshelves.

The table below shows the ranges of levels that will be offered in each slot for a given number of bookshelves.

In Creative mode, no levels or experience are necessary for enchantments.