|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.minecraftforge.common.DungeonHooks
public class DungeonHooks
Nested Class Summary | |
---|---|
static class |
DungeonHooks.DungeonLoot
|
static class |
DungeonHooks.DungeonMob
|
Constructor Summary | |
---|---|
DungeonHooks()
|
Method Summary | |
---|---|
static void |
addDungeonLoot(ItemStack item,
int rarity)
Adds a item stack to the dungeon loot list with a stack size of 1. |
static float |
addDungeonLoot(ItemStack item,
int rarity,
int minCount,
int maxCount)
Adds a item stack, with a range of sizes, to the dungeon loot list. |
static float |
addDungeonMob(String name,
int rarity)
Adds a mob to the possible list of creatures the spawner will create. |
static int |
getDungeonLootTries()
|
static ItemStack |
getRandomDungeonLoot(Random rand)
Gets a random item stack to place in a dungeon chest during world generation |
static String |
getRandomDungeonMob(Random rand)
Gets a random mob name from the list. |
static void |
removeDungeonLoot(ItemStack item)
Removes a item stack from the dungeon loot list, this will remove all items as long as the item stack matches, it will not care about matching the stack size ranges perfectly. |
static void |
removeDungeonLoot(ItemStack item,
int minCount,
int maxCount)
Removes a item stack from the dungeon loot list. |
static int |
removeDungeonMob(String name)
Will completely remove a Mob from the dungeon spawn list. |
static void |
setDungeonLootTries(int number)
Set the number of item stacks that will be attempted to be added to each Dungeon chest. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DungeonHooks()
Method Detail |
---|
public static void setDungeonLootTries(int number)
number
- The maximum number of item stacks to add to a chest.public static int getDungeonLootTries()
public static float addDungeonMob(String name, int rarity)
name
- The name of the monster, use the same name used when registering the entity.rarity
- The rarity of selecting this mob over others. Must be greater then 0.
Vanilla Minecraft has the following mobs:
Spider 100
Skeleton 100
Zombie 200
Meaning, Zombies are twice as common as spiders or skeletons.
public static int removeDungeonMob(String name)
name
- The name of the mob to remove
public static String getRandomDungeonMob(Random rand)
rand
- World generation random number generator
public static void addDungeonLoot(ItemStack item, int rarity)
item
- The ItemStack to be added to the loot listrarity
- The relative chance that this item will spawn, Vanilla has
most of its items set to 1. Like the saddle, bread, silk, wheat, etc..
Rarer items are set to lower values, EXA: Golden Apple 0.01public static float addDungeonLoot(ItemStack item, int rarity, int minCount, int maxCount)
item
- The ItemStack to be added to the loot listrarity
- The relative chance that this item will spawn, Vanilla has
most of its items set to 1. Like the saddle, bread, silk, wheat, etc..
Rarer items are set to lower values, EXA: Golden Apple 0.01minCount
- When this item does generate, the minimum number that is in the stackmaxCount
- When this item does generate, the maximum number that can bein the stack
public static void removeDungeonLoot(ItemStack item)
item
- The item stack to removepublic static void removeDungeonLoot(ItemStack item, int minCount, int maxCount)
item
- The item stack to removeminCount
- The minimum count for the match check, if less then 0,
the size check is skippedmaxCount
- The max count used in match check when 'minCount' is >= 0public static ItemStack getRandomDungeonLoot(Random rand)
rand
- World generation random number generator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |