Class WeightedRandom

java.lang.Object
net.minecraft.src.WeightedRandom

public class WeightedRandom extends Object
  • Constructor Details

    • WeightedRandom

      public WeightedRandom()
  • Method Details

    • getTotalWeight

      public static int getTotalWeight(Collection par0Collection)
      Returns the total weight of all items in a collection.
    • getRandomItem

      public static WeightedRandomItem getRandomItem(Random par0Random, Collection par1Collection, int par2)
      Returns a random choice from the input items, with a total weight value.
    • getRandomItem

      public static WeightedRandomItem getRandomItem(Random par0Random, Collection par1Collection)
      Returns a random choice from the input items.
    • getTotalWeight

      public static int getTotalWeight(WeightedRandomItem[] par0ArrayOfWeightedRandomItem)
      Returns the total weight of all items in a array.
    • getRandomItem

      public static WeightedRandomItem getRandomItem(Random par0Random, WeightedRandomItem[] par1ArrayOfWeightedRandomItem, int par2)
      Returns a random choice from the input array of items, with a total weight value.
    • getRandomItem

      public static WeightedRandomItem getRandomItem(Random par0Random, WeightedRandomItem[] par1ArrayOfWeightedRandomItem)
      Returns a random choice from the input items.