After starting with tutorials such as Jabelar's excellent post on Custom Entities and then scouring the Forge forums for similar issues, I have been unable to find any solution that enables my mod to naturally spawn in entities. As a last resort, I'm posting here in hopes that someone can shed some light on my issue.
CommonProxy.class
public void postInit(FMLPostInitializationEvent e)
{
EntityManager.registerEntities();
}
Note: I originally had it in the preInit method but I read somewhere that maybe what I was accessing hadn't been initialized yet (but not throwing an error?) so I moved it here.
EntityManager.class
public static void registerEntities()
{
//Entity.class, Texture Name, Tracking Range, Update Frequency, Should Track, Spawn Prob, Spawn min, Spawn Max
RegistryManager.register(new CustomEntityInfo(Runner.class, "Runner", 80, 3, false, 1000, 1, 7));
}
CustomEntityInfo is just a holding object for data I feed into the EntityRegistry. Click the spoiler should you wish to see it.
And finally where the magic happens.
RegistryManager.class
public static void register(CustomEntityInfo e)
{
EntityRegistry.registerModEntity(e.getStoredClass(), e.getName(), e.getID(), Mod.instance, e.getTrackingRange(), e.getUpdateFreq(), e.getShouldTrack());
EntityRegistry.addSpawn(e.getStoredClass(), e.getSpawnProbability(), e.getSpawnMin(), e.getSpawnMax(), EnumCreatureType.creature, e.getSpawnBiomes());
}
I have tried just about everything. I tried specifying Biomes directly in the EntityRegistry.addSpawn() method and I even tried extending EntityLiving and using EnumCreatureType.Ambient. They only thing I have not tried yet is using EntityRegistry's methods to register a Global ID as that is backwards thinking and there has to be some way to do this without limiting ourselves to only 255 mobs.
If you can see where I messed up, a bit of insight would be a great help!
#Edit: Realized I forgot to include my entity classes
#Edit^2: Updated code to reflect changes mentioned in third post.
Additional Classes:
Runner.class
BaseEnemy.class
AbstractEntity.class