|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.minecraft.util.WeightedRandom
public class WeightedRandom
| Constructor Summary | |
|---|---|
WeightedRandom()
|
|
| Method Summary | |
|---|---|
static WeightedRandomItem |
getRandomItem(Random par0Random,
Collection par1Collection)
Returns a random choice from the input items. |
static WeightedRandomItem |
getRandomItem(Random par0Random,
Collection par1Collection,
int par2)
Returns a random choice from the input items, with a total weight value. |
static WeightedRandomItem |
getRandomItem(Random par0Random,
WeightedRandomItem[] par1ArrayOfWeightedRandomItem)
Returns a random choice from the input items. |
static WeightedRandomItem |
getRandomItem(Random par0Random,
WeightedRandomItem[] par1ArrayOfWeightedRandomItem,
int par2)
Returns a random choice from the input array of items, with a total weight value. |
static int |
getTotalWeight(Collection par0Collection)
Returns the total weight of all items in a collection. |
static int |
getTotalWeight(WeightedRandomItem[] par0ArrayOfWeightedRandomItem)
Returns the total weight of all items in a array. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WeightedRandom()
| Method Detail |
|---|
public static int getTotalWeight(Collection par0Collection)
public static WeightedRandomItem getRandomItem(Random par0Random,
Collection par1Collection,
int par2)
public static WeightedRandomItem getRandomItem(Random par0Random,
Collection par1Collection)
public static int getTotalWeight(WeightedRandomItem[] par0ArrayOfWeightedRandomItem)
public static WeightedRandomItem getRandomItem(Random par0Random,
WeightedRandomItem[] par1ArrayOfWeightedRandomItem,
int par2)
public static WeightedRandomItem getRandomItem(Random par0Random,
WeightedRandomItem[] par1ArrayOfWeightedRandomItem)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||