Posted March 22, 201510 yr Hi, I'm trying to get BOP compatible mob spawning working and am having some trouble. Here's my code: for (int i = 0; i < BiomeGenBase.getBiomeGenArray().length; i++) { BiomeGenBase biome = BiomeGenBase.getBiomeGenArray()[i]; if (biome != null){ if (BiomeDictionary.isBiomeOfType(biome, Type.END)) { EntityRegistry.addSpawn(EntityEnderSpider.class, 2, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityEnderTriplets.class, 1, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityEnderWatcher.class, 10, 4, 4, EnumCreatureType.monster, biome); } else if (BiomeDictionary.isBiomeOfType(biome, Type.NETHER)) { //EntityRegistry.addSpawn(EntityHellBat.class, 50, 1, 1, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityHellPig.class, 25, 5, 50, EnumCreatureType.creature, biome); EntityRegistry.addSpawn(EntityHellSpider.class, 50, 1, 1, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityScorcher.class, 7, 4, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityWildfire.class, 50, 1, 1, EnumCreatureType.monster, biome); } else if(BiomeDictionary.isBiomeRegistered(biome)) { if (BiomeDictionary.isBiomeOfType(biome, Type.SNOWY)) { EntityRegistry.addSpawn(EntityGlacon.class, 30, 1, 1, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityFrost.class, 50, 1, 4, EnumCreatureType.monster, biome); } if (BiomeDictionary.isBiomeOfType(biome, Type.SANDY)) { EntityRegistry.addSpawn(EntityDesertCrawler.class, 50, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityAridWarrior.class, 35, 1, 4, EnumCreatureType.monster, biome); } if (BiomeDictionary.isBiomeOfType(biome, Type.OCEAN)) { EntityRegistry.addSpawn(EntityWhale.class, 1, 1, 1, EnumCreatureType.waterCreature, biome); EntityRegistry.addSpawn(EntityShark.class, 1, 1, 1, EnumCreatureType.waterCreature, biome); } if (BiomeDictionary.isBiomeOfType(biome, Type.BEACH)) { EntityRegistry.addSpawn(EntityCrab.class, 100, 4, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityKingCrab.class, 40, 4, 4, EnumCreatureType.monster, biome); } if (BiomeDictionary.isBiomeOfType(biome, Type.JUNGLE)) { EntityRegistry.addSpawn(EntityJungleBat.class, 50, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityJungleDramcryx.class, 70, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityJungleSpider.class, 40, 1, 4, EnumCreatureType.monster, biome); } EntityRegistry.addSpawn(EntityCyclops.class, 2, 2, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityMiner.class, 1, 1, 1, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityJackOMan.class, 1, 1, 1, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityCaveCrawler.class, 50, 2, 3, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityRotatick.class, 50, 3, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityEnthralledDramcryx.class, 50, 3, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityTheEye.class, 20, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityCaveclops.class, 50, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityEnderSpider.class, 2, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityRainbour.class, 2, 1, 1, EnumCreatureType.ambient, biome); } } } I need to check if the biome only appears in the overworld somehow, since this is a dimension mod and I'd like it to be compatible with other dimension mods. However, BiomeDictionary has a makeBestGuess method, so BiomeDictionary.isBiomeRegistered(biome) is always true since the biomes are being registered with makeBestGuess . Does anyone know of a good alternative? Thanks! Check out my mod, Realms of Chaos, here. If I helped you, be sure to press the "Thank You" button!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.