While creating a plugin that uses custom chunk generators (provides org.bukkit.generator.ChunkGenerator to world creator), I notice that in my new world Phantoms, Cats (in villages) and Patrols are not spawning at all. Even more, they are not processed at all.
When trying to find out a reason for this behavior I notice, that if ChunkGenerator is provided to world creator, then it always uses "org.bukkit.craftbukkit.generator.CustomChunkGenerator" class that process chunk generation and controls mob spawning.
Unfortunately, this CustomChunkGenerator does not contain methods that could process phantoms, cats and patrols. Unlike it is in Mojang chunk generators (like ChunkProviderGenerate), here on method call doMobSpawning
nothing is processed, so these 3 mob spawning processed are not happening.
I suggest to add 3 new fields for CustomChunkGenerator:
and in method doMobSpawning process these spawners:
This change will allow processing phantoms, cats and patrols in the same way as it is in default chunk generator (ChunkProviderGenerate).