net.minecraft.util

## Class WeightedRandom

- java.lang.Object
- - net.minecraft.util.WeightedRandom

-     public class WeightedRandom
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `WeightedRandom.Item`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WeightedRandom()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static WeightedRandom.Item` | `getItem(java.util.Collection par1Collection, int weight)`
    `static WeightedRandom.Item` | `getItem(WeightedRandom.Item[] par1ArrayOfWeightedRandomItem, int weight)`
    `static WeightedRandom.Item` | `getRandomItem(java.util.Random par0Random, java.util.Collection par1Collection)`
    `static WeightedRandom.Item` | `getRandomItem(java.util.Random par0Random, java.util.Collection par1Collection, int par2)`
    `static WeightedRandom.Item` | `getRandomItem(java.util.Random par0Random, WeightedRandom.Item[] par1ArrayOfWeightedRandomItem)`
    `static WeightedRandom.Item` | `getRandomItem(java.util.Random par0Random, WeightedRandom.Item[] par1ArrayOfWeightedRandomItem, int par2)`
    `static int` | `getTotalWeight(java.util.Collection par0Collection)`
    `static int` | `getTotalWeight(WeightedRandom.Item[] par0ArrayOfWeightedRandomItem)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WeightedRandom

          public WeightedRandom()

  - ### Method Detail

    - #### getTotalWeight

          public static int getTotalWeight(java.util.Collection par0Collection)

    - #### getRandomItem

          public static WeightedRandom.Item getRandomItem(java.util.Random par0Random,
                                          java.util.Collection par1Collection,
                                          int par2)

    - #### getItem

          public static WeightedRandom.Item getItem(java.util.Collection par1Collection,
                                    int weight)

    - #### getRandomItem

          public static WeightedRandom.Item getRandomItem(java.util.Random par0Random,
                                          java.util.Collection par1Collection)

    - #### getTotalWeight

          public static int getTotalWeight(WeightedRandom.Item[] par0ArrayOfWeightedRandomItem)

    - #### getRandomItem

          public static WeightedRandom.Item getRandomItem(java.util.Random par0Random,
                                          WeightedRandom.Item[] par1ArrayOfWeightedRandomItem,
                                          int par2)

    - #### getItem

          public static WeightedRandom.Item getItem(WeightedRandom.Item[] par1ArrayOfWeightedRandomItem,
                                    int weight)

    - #### getRandomItem

          public static WeightedRandom.Item getRandomItem(java.util.Random par0Random,
                                          WeightedRandom.Item[] par1ArrayOfWeightedRandomItem)