Minecraft wiki entry for Enchanting_mechanics, associated text: This algorithm produces the same results as listing each enchantment the number of times given by its weight, then choosing a random entry from the combined list.