    001package net.minecraft.enchantment;
    002
    003import net.minecraft.util.WeightedRandomItem;
    004
    005public class EnchantmentData extends WeightedRandomItem
    006{
    007    /** Enchantment object associated with this EnchantmentData */
    008    public final Enchantment enchantmentobj;
    009
    010    /** Enchantment level associated with this EnchantmentData */
    011    public final int enchantmentLevel;
    012
    013    public EnchantmentData(Enchantment par1Enchantment, int par2)
    014    {
    015        super(par1Enchantment.getWeight());
    016        this.enchantmentobj = par1Enchantment;
    017        this.enchantmentLevel = par2;
    018    }
    019
    020    public EnchantmentData(int par1, int par2)
    021    {
    022        this(Enchantment.enchantmentsList[par1], par2);
    023    }
    024}