Package net.minecraft.src
Class WeightedRandom
java.lang.Object
net.minecraft.src.WeightedRandom
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WeightedRandomItemgetRandomItem(Random par0Random, Collection par1Collection) Returns a random choice from the input items.static WeightedRandomItemgetRandomItem(Random par0Random, Collection par1Collection, int par2) Returns a random choice from the input items, with a total weight value.static WeightedRandomItemgetRandomItem(Random par0Random, WeightedRandomItem[] par1ArrayOfWeightedRandomItem) Returns a random choice from the input items.static WeightedRandomItemgetRandomItem(Random par0Random, WeightedRandomItem[] par1ArrayOfWeightedRandomItem, int par2) Returns a random choice from the input array of items, with a total weight value.static intgetTotalWeight(Collection par0Collection) Returns the total weight of all items in a collection.static intgetTotalWeight(WeightedRandomItem[] par0ArrayOfWeightedRandomItem) Returns the total weight of all items in a array.
-
Constructor Details
-
WeightedRandom
public WeightedRandom()
-
-
Method Details
-
getTotalWeight
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
Returns a random choice from the input items. -
getTotalWeight
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.
-