Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraftforge.common
Class DungeonHooks

    java.lang.Object
      net.minecraftforge.common.DungeonHooks

    public class DungeonHooks

extends Object

Nested Class Summary
`static class` | `DungeonHooks.DungeonLoot`
`static class` | `DungeonHooks.DungeonMob`

Constructor Summary
`DungeonHooks()`

Method Summary
`void` | `addDungeonLoot(DungeonHooks.DungeonLoot loot)`
`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.
`boolean` | `removeDungeonLoot(DungeonHooks.DungeonLoot loot)`
`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

### DungeonHooks

    public DungeonHooks()

Method Detail

### setDungeonLootTries

    public static void setDungeonLootTries(int number)

  Set the number of item stacks that will be attempted to be added to each Dungeon chest. Note: Due to random number generation, you will not always get this amount per chest.

  Parameters:
    `number` - The maximum number of item stacks to add to a chest.

### getDungeonLootTries

    public static int getDungeonLootTries()

  Returns:
    The max number of item stacks found in each dungeon chest.

### addDungeonMob

    public static float addDungeonMob(String name,
                                      int rarity)

  Adds a mob to the possible list of creatures the spawner will create. If the mob is already in the spawn list, the rarity will be added to the existing one, causing the mob to be more common.

  Parameters:
    `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.
  Returns:
    The new rarity of the monster,

### removeDungeonMob

    public static int removeDungeonMob(String name)

  Will completely remove a Mob from the dungeon spawn list.

  Parameters:
    `name` - The name of the mob to remove
  Returns:
    The rarity of the removed mob, prior to being removed.

### getRandomDungeonMob

    public static String getRandomDungeonMob(Random rand)

  Gets a random mob name from the list.

  Parameters:
    `rand` - World generation random number generator
  Returns:
    The mob name

### addDungeonLoot

    public static void addDungeonLoot(ItemStack item,
                                      int rarity)

  Adds a item stack to the dungeon loot list with a stack size of 1.

  Parameters:
    `item` - The ItemStack to be added to the loot list
    `rarity` - 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.01

### addDungeonLoot

    public 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. If a stack matching the same item, and size range, is already in the list the rarities will be added together making the item more common.

  Parameters:
    `item` - The ItemStack to be added to the loot list
    `rarity` - 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.01
    `minCount` - When this item does generate, the minimum number that is in the stack
    `maxCount` - When this item does generate, the maximum number that can bein the stack
  Returns:
    The new rarity of the loot.

### removeDungeonLoot

    public 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.

  Parameters:
    `item` - The item stack to remove

### removeDungeonLoot

    public static void removeDungeonLoot(ItemStack item,
                                         int minCount,
                                         int maxCount)

  Removes a item stack from the dungeon loot list. If 'minCount' parameter is greater then 0, it will only remove loot items that have the same exact stack size range as passed in by parameters.

  Parameters:
    `item` - The item stack to remove
    `minCount` - The minimum count for the match check, if less then 0, the size check is skipped
    `maxCount` - The max count used in match check when 'minCount' is >= 0

### getRandomDungeonLoot

    public static ItemStack getRandomDungeonLoot(Random rand)

  Gets a random item stack to place in a dungeon chest during world generation

  Parameters:
    `rand` - World generation random number generator
  Returns:
    The item stack

### addDungeonLoot

    public void addDungeonLoot(DungeonHooks.DungeonLoot loot)

### removeDungeonLoot

    public boolean removeDungeonLoot(DungeonHooks.DungeonLoot loot)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD