Changing the Mob Spawn in a Dungeon
If you don’t know what a dungeon is, you should read the following web page: http://minecraft.gamepedia.com/Dungeon.
Forge is a very good API. It lets you change many small things without changing any of the code directly, which results in mods not working together.
Removing a Mob
Forge allows you to change the mob spawn in a dungeon, for example, using a simple method in your mod file. First, a method that removes spider dungeons will look as follows.
Again, don’t forget to import the new files.
This method removes the spider from the dungeon. It is a method in the DungeonHooks file that will select the mob that will be spawned in the dungeon. The removeDungeonMob takes a single String parameter that has to be the name of the mob in the code. If you want to know the exact names of all the mobs in Minecraft, go to the EntityList file in the net.minecraft.entity package of the ForgeSrc library.
Make sure you spell “Spider” correctly, or it won’t work. The standard mobs spawning in a dungeon can be seen in the DungeonHooks file. You can also use this method to remove the spawn of a mob from a different mod, provided you have the name of it.
Adding a Mob
You can also add mobs to the dungeons using the next method:
The first parameter is just like the removeDungeonMob, the code name of the mob. The second parameter is the spawn chance. As documented in the DungeonHooks file, spiders and skeletons have a 100 chance of spawning. Zombies have a chance of 200. Modifications such as this one can be found by browsing the Forge code.