net.minecraft.util

## Class WeightedRandomChestContent

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

-     public class WeightedRandomChestContent
      extends WeightedRandom.Item

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `ItemStack` | `theItemId`
    `int` | `theMaximumChanceToGenerateItem`
    `int` | `theMinimumChanceToGenerateItem`

    - ### Fields inherited from class net.minecraft.util.WeightedRandom.Item

      `itemWeight`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WeightedRandomChestContent(Item p_i45311_1_, int p_i45311_2_, int p_i45311_3_, int p_i45311_4_, int p_i45311_5_)`
    `WeightedRandomChestContent(ItemStack par1ItemStack, int par2, int par3, int par4)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static WeightedRandomChestContent[]` | `func_92080_a(WeightedRandomChestContent[] par0ArrayOfWeightedRandomChestContent, WeightedRandomChestContent... par1ArrayOfWeightedRandomChestContent)`
    `protected ItemStack[]` | `generateChestContent(java.util.Random random, IInventory newInventory)` Allow a mod to submit a custom implementation that can delegate item stack generation beyond simple stack lookup
    `static void` | `generateChestContents(java.util.Random par0Random, WeightedRandomChestContent[] par1ArrayOfWeightedRandomChestContent, IInventory par2IInventory, int par3)`
    `static void` | `generateDispenserContents(java.util.Random p_150706_0_, WeightedRandomChestContent[] p_150706_1_, TileEntityDispenser p_150706_2_, int p_150706_3_)`

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

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

- - ### Field Detail

    - #### theItemId

          public ItemStack theItemId

    - #### theMinimumChanceToGenerateItem

          public int theMinimumChanceToGenerateItem

    - #### theMaximumChanceToGenerateItem

          public int theMaximumChanceToGenerateItem

  - ### Constructor Detail

    - #### WeightedRandomChestContent

          public WeightedRandomChestContent(Item p_i45311_1_,
                                    int p_i45311_2_,
                                    int p_i45311_3_,
                                    int p_i45311_4_,
                                    int p_i45311_5_)

    - #### WeightedRandomChestContent

          public WeightedRandomChestContent(ItemStack par1ItemStack,
                                    int par2,
                                    int par3,
                                    int par4)

  - ### Method Detail

    - #### generateChestContents

          public static void generateChestContents(java.util.Random par0Random,
                                   WeightedRandomChestContent[] par1ArrayOfWeightedRandomChestContent,
                                   IInventory par2IInventory,
                                   int par3)

    - #### generateDispenserContents

          public static void generateDispenserContents(java.util.Random p_150706_0_,
                                       WeightedRandomChestContent[] p_150706_1_,
                                       TileEntityDispenser p_150706_2_,
                                       int p_150706_3_)

    - #### func_92080_a

          public static WeightedRandomChestContent[] func_92080_a(WeightedRandomChestContent[] par0ArrayOfWeightedRandomChestContent,
                                                  WeightedRandomChestContent... par1ArrayOfWeightedRandomChestContent)

    - #### generateChestContent

          protected ItemStack[] generateChestContent(java.util.Random random,
                                         IInventory newInventory)

      Allow a mod to submit a custom implementation that can delegate item stack generation beyond simple stack lookup
      Parameters:
        `random` - The current random for generation
        `newInventory` - The inventory being generated (do not populate it, but you can refer to it)
      Returns:
        An array of `ItemStack` to put into the chest