Merge pull request #583 from Karang/master

Really close to be connected to server.
World generation improvements

Made chest corridors rarer
Rivers in mountains
Mushroom biomes further away from shore
Stop spawning in mushroom islands
Signed-off-by: Aleksi Sapon <QcTechs@gmail.com>
Added enchantment mechanics on enchantment table
*Added methods to api/enchantment/Enchantment.java to generate and add random enchantments
*Logic based on Minecraft 1.4.7 source
*Changed "enchantment level" to "power level" in places to distinguish between the power level of an enchantment (I, II, III, IV, V) and the enchantment level displayed in the enchantment interface (1 to 30)
*Fixed bug in Enchantments.values(), which was assuming the enchantment ids were consecutive
*Fixed bug in Enchantment.addEnchantment etc, which weren't putting the NBT data in the correct format (http://www.minecraftwiki.net/wiki/Player.dat_Format#Item_structure)
*Fixed bug in ToolEnchantment.canEnchant (returned true on bows and swords)
*Simplified xp code
*Update EnchantmentTable's level display when it changes, rather than every tick
*Allow bookshelves on one side of table to contribute despite blocks on the other side (still not quite identical to Vanilla)
*Moved enchantment levels from EnchantmentTableInventory to EnchantmentTableWindow
*Added tests EnchantmentTest and LevelComponentTest
Signed-off-by: stewbasic <stewbasic@gmail.com>
Merge pull request #565 from stewbasic/enchantment

Added enchantment mechanics on enchantment table. Thanks a ton @stewbasic !
Replace randoms with coordinate hashes when working with buffers

With random the output will vary with buffer sizes, this make sure the
results are the same for every point no matter what.
Signed-off-by: Aleksi Sapon <QcTechs@gmail.com>
Finalize protocol encryption.
Signed-off-by: Karang <arthur.hennequin@free.fr>