List of usage examples for net.minecraftforge.common DungeonHooks removeDungeonMob
public static int removeDungeonMob(EntityType<?> name)
From source file:ccm.nucleumOmnium.dungeonMaster.DungeonMaster.java
License:Open Source License
public static void init() { Configuration config = new Configuration(new File(NucleumOmnium.getCCMFolder(), "DungeonMaster.cfg")); List<String> ourDungeonMobs = new ArrayList<String>(); try {//from www. j a v a 2s . c o m //noinspection unchecked ArrayList<DungeonHooks.DungeonMob> dungeonMobs = (ArrayList<DungeonHooks.DungeonMob>) dungeonMobsField .get(null); for (DungeonHooks.DungeonMob mob : dungeonMobs .toArray(new DungeonHooks.DungeonMob[dungeonMobs.size()])) { ourDungeonMobs.add(mob.type + ":" + mob.itemWeight); DungeonHooks.removeDungeonMob(mob.type); } } catch (IllegalAccessException e) { e.printStackTrace(); } for (String thing : config.get(DUNGEONS_PAWNING, "dungeonList", ourDungeonMobs.toArray(new String[ourDungeonMobs.size()]), DUNGEON_LIST_HELP).getStringList()) { String[] split = thing.split(":"); DungeonHooks.addDungeonMob(split[0], Integer.parseInt(split[1])); } config.save(); }