|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.minecraftforge.common.ChestGenHooks
public class ChestGenHooks
Field Summary | |
---|---|
static String |
BONUS_CHEST
|
static String |
DUNGEON_CHEST
|
static String |
MINESHAFT_CORRIDOR
|
static String |
PYRAMID_DESERT_CHEST
|
static String |
PYRAMID_JUNGLE_CHEST
|
static String |
PYRAMID_JUNGLE_DISPENSER
|
static String |
STRONGHOLD_CORRIDOR
|
static String |
STRONGHOLD_CROSSING
|
static String |
STRONGHOLD_LIBRARY
|
static String |
VILLAGE_BLACKSMITH
|
Constructor Summary | |
---|---|
ChestGenHooks(String category)
|
|
ChestGenHooks(String category,
WeightedRandomChestContent[] items,
int min,
int max)
|
Method Summary | |
---|---|
static void |
addItem(String category,
WeightedRandomChestContent item)
|
void |
addItem(WeightedRandomChestContent item)
Adds a new entry into the possible items to generate. |
static ItemStack[] |
generateStacks(Random rand,
ItemStack source,
int min,
int max)
Generates an array of items based on the input min/max count. |
int |
getCount(Random rand)
Gets a random number between countMin and countMax. |
static int |
getCount(String category,
Random rand)
|
static ChestGenHooks |
getInfo(String category)
Retrieves, or creates the info class for the specified category. |
WeightedRandomChestContent[] |
getItems(Random rnd)
Gets an array of all random objects that are associated with this category. |
static WeightedRandomChestContent[] |
getItems(String category,
Random rnd)
|
int |
getMax()
|
int |
getMin()
|
ItemStack |
getOneItem(Random rand)
Returns a single ItemStack from the possible items in this registry, Useful if you just want a quick and dirty random Item. |
static ItemStack |
getOneItem(String category,
Random rand)
|
void |
removeItem(ItemStack item)
Removes all items that match the input item stack, Only metadata and item ID are checked. |
static void |
removeItem(String category,
ItemStack item)
|
void |
setMax(int value)
|
void |
setMin(int value)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MINESHAFT_CORRIDOR
public static final String PYRAMID_DESERT_CHEST
public static final String PYRAMID_JUNGLE_CHEST
public static final String PYRAMID_JUNGLE_DISPENSER
public static final String STRONGHOLD_CORRIDOR
public static final String STRONGHOLD_LIBRARY
public static final String STRONGHOLD_CROSSING
public static final String VILLAGE_BLACKSMITH
public static final String BONUS_CHEST
public static final String DUNGEON_CHEST
Constructor Detail |
---|
public ChestGenHooks(String category)
public ChestGenHooks(String category, WeightedRandomChestContent[] items, int min, int max)
Method Detail |
---|
public static ChestGenHooks getInfo(String category)
category
- The category name
public static ItemStack[] generateStacks(Random rand, ItemStack source, int min, int max)
rand
- A random number generatorsource
- Source item stackmin
- Minimum number of itemsmax
- Maximum number of items
public static WeightedRandomChestContent[] getItems(String category, Random rnd)
public static int getCount(String category, Random rand)
public static void addItem(String category, WeightedRandomChestContent item)
public static void removeItem(String category, ItemStack item)
public static ItemStack getOneItem(String category, Random rand)
public void addItem(WeightedRandomChestContent item)
item
- The item to add.public void removeItem(ItemStack item)
item
- The item to checkpublic WeightedRandomChestContent[] getItems(Random rnd)
public int getCount(Random rand)
rand
- A RNG
public ItemStack getOneItem(Random rand)
rand
- A Random Number gen
public int getMin()
public int getMax()
public void setMin(int value)
public void setMax(int value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |