コード例 #1
0
 /// <summary>
 /// Enchants the selected entities hand item
 /// </summary>
 /// <param name="selector">The <see cref="BaseSelector"/> to use</param>
 /// <param name="enchant">the enchantment to enchant with</param>
 /// <param name="level">the level of the enchantment</param>
 public void Enchant(BaseSelector selector, ID.Enchant enchant, int level)
 {
     ForFunction.AddCommand(new EnchantCommand(selector, level, enchant));
 }
コード例 #2
0
 /// <summary>
 /// Intializes a new <see cref="OreCountChange"/>
 /// </summary>
 /// <param name="enchant">The enchant to get the level from (An enchant on the item which activated this loot table)</param>
 public OreCountChange(ID.Enchant enchant) : base("minecraft:apply_bonus")
 {
     Enchant = enchant;
 }
コード例 #3
0
 /// <summary>
 /// Intializes a new <see cref="UniformDistributionCountChange"/>
 /// </summary>
 /// <param name="enchant">The enchant to get the level from.</param>
 /// <param name="multiplier">The number to multiple the enchant level with.</param>
 public UniformDistributionCountChange(ID.Enchant enchant, double multiplier) : base("minecraft:apply_bonus")
 {
     Enchant    = enchant;
     Multiplier = multiplier;
 }
コード例 #4
0
 /// <summary>
 /// Intializes a new <see cref="BinomialDistributionCountChange"/>
 /// </summary>
 /// <param name="enchant">The enchant to get the level from. The level is added to extra</param>
 /// <param name="maxItems">The amount of items to drop</param>
 /// <param name="probability">The probability for an item to drop</param>
 public BinomialDistributionCountChange(ID.Enchant enchant, int maxItems, double probability) : base("minecraft:apply_bonus")
 {
     Enchant     = enchant;
     MaxItems    = maxItems;
     Probability = probability;
 }
コード例 #5
0
 /// <summary>
 /// Intializes a new <see cref="EnchantChanceCondition"/>
 /// </summary>
 /// <param name="chances">The enchant to check for</param>
 /// <param name="enchant">The chance for each level of the enchantment</param>
 public EnchantChanceCondition(ID.Enchant enchant, double[] chances) : base("minecraft:table_bonus")
 {
     Enchant = enchant;
     Chances = chances;
 }