Package net.minecraftforge.common
Class DungeonHooks
- java.lang.Object
-
- net.minecraftforge.common.DungeonHooks
-
public class DungeonHooks extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DungeonHooks.DungeonMob
-
Field Summary
Fields Modifier and Type Field Description private static java.util.ArrayList<DungeonHooks.DungeonMob>
dungeonMobs
-
Constructor Summary
Constructors Constructor Description DungeonHooks()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static float
addDungeonMob(EntityType<?> type, int rarity)
Adds a mob to the possible list of creatures the spawner will create.static EntityType<?>
getRandomDungeonMob(java.util.Random rand)
Gets a random mob name from the list.static int
removeDungeonMob(EntityType<?> name)
Will completely remove a Mob from the dungeon spawn list.
-
-
-
Field Detail
-
dungeonMobs
private static java.util.ArrayList<DungeonHooks.DungeonMob> dungeonMobs
-
-
Method Detail
-
addDungeonMob
public static float addDungeonMob(EntityType<?> type, 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:
type
- Monster typerarity
- 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(EntityType<?> 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 EntityType<?> getRandomDungeonMob(java.util.Random rand)
Gets a random mob name from the list.- Parameters:
rand
- World generation random number generator- Returns:
- The mob name
-
-