public class WeightedRandomChestContent extends WeightedRandomItem
Modifier and Type | Field and Description |
---|---|
ItemStack |
theItemId
The Item/Block ID to generate in the Chest.
|
int |
theMaximumChanceToGenerateItem
The maximum chance of item generating.
|
int |
theMinimumChanceToGenerateItem
The minimum chance of item generating.
|
itemWeight
Constructor and Description |
---|
WeightedRandomChestContent(int par1,
int par2,
int par3,
int par4,
int par5) |
WeightedRandomChestContent(ItemStack par1ItemStack,
int par2,
int par3,
int par4) |
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)
Generates the Chest contents.
|
static void |
generateDispenserContents(java.util.Random par0Random,
WeightedRandomChestContent[] par1ArrayOfWeightedRandomChestContent,
TileEntityDispenser par2TileEntityDispenser,
int par3)
Generates the Dispenser contents.
|
public ItemStack theItemId
public int theMinimumChanceToGenerateItem
public int theMaximumChanceToGenerateItem
public WeightedRandomChestContent(int par1, int par2, int par3, int par4, int par5)
public WeightedRandomChestContent(ItemStack par1ItemStack, int par2, int par3, int par4)
public static void generateChestContents(java.util.Random par0Random, WeightedRandomChestContent[] par1ArrayOfWeightedRandomChestContent, IInventory par2IInventory, int par3)
public static void generateDispenserContents(java.util.Random par0Random, WeightedRandomChestContent[] par1ArrayOfWeightedRandomChestContent, TileEntityDispenser par2TileEntityDispenser, int par3)
public static WeightedRandomChestContent[] func_92080_a(WeightedRandomChestContent[] par0ArrayOfWeightedRandomChestContent, WeightedRandomChestContent... par1ArrayOfWeightedRandomChestContent)
protected ItemStack[] generateChestContent(java.util.Random random, IInventory newInventory)
random
- The current random for generationnewInventory
- The inventory being generated (do not populate it, but you can refer to it)ItemStack
to put into the chest