I should note that I see both creatures (chickens, sheep, cows) and monsters (skeletons, zombies, creepers) all spawning in my world.
I have re-generated my world multiple times as well tried moving the "MinecraftForge.EVENT_BUS.register(new SpawningEventHandler());" to the preInit and load.
Still no success in ever seeing an entry into the onCheckIfCanSpawn!
public class SpawningEventHandler {
@SubscribeEvent
public void onCheckIfCanSpawn(CheckSpawn event)
{
System.out.println("[MRC] checking monster");
FMLCommonHandler.instance().getFMLLogger().log(Level.DEBUG, "[WWRPG] checking if monster " + event.entityLiving + " can spawn at x,z,y " + event.x + "," + event.z + "," + event.y);
}
}
I do see that the performWorldGenSpawning in SpawnerAnimals.java does spawn EnumCreatureType.creature without ever firing forge's canEntitySpawn method, but I can't figure out how monsters are spawning???
For extra debug, I added an event handler for WorldEvent.PotentialSpawns to check if the monster list isn't null since it is called in the spawnRandomCreature before the ForgeEventFactory.canEntitySpawn method is called.
@SubscribeEvent
public void onPotentialSpawn(WorldEvent.PotentialSpawns event)
{
if ( event.type == EnumCreatureType.monster && event.list != null && !event.list.isEmpty() ){
System.out.println("[MRC] potential random monster list is valid!");
}
}
And I get lots of debug hits for that as I explore the world... so I'm guessing either the "spawnlistentry == null" every time or the getConstructor is throwing an exception (even though I see no stack trace in the logs).
But regardless... this does not explain how monsters are still spawning??? I'm going crazy... what is spawning them?