@Override public void set(final Object obj, final Boolean val) throws IllegalArgumentException { if(!(obj instanceof Biome)) throw new IllegalArgumentException("Passed object is not an instance of Biome!"); if(val) BiomeManager.addStrongholdBiome((Biome) obj); else BiomeManager.removeStrongholdBiome((Biome) obj); }
/** * This method should be called during the "init" FML lifecycle * because it must happen after object handler injection. */ public static void initBiomeManagerAndDictionary() { BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(cloud, 10)); BiomeManager.addSpawnBiome(cloud); BiomeManager.addStrongholdBiome(cloud); BiomeManager.addVillageBiome(cloud, true); BiomeDictionary.addTypes(cloud, BiomeDictionary.Type.COLD, BiomeDictionary.Type.DRY, BiomeDictionary.Type.MAGICAL ); } }
@Override public void registerBiomeDictionary() { if (spawnWeight > 0) { BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeManager.BiomeEntry(getBiome(), spawnWeight)); } BiomeManager.addSpawnBiome(getBiome()); BiomeManager.addStrongholdBiome(getBiome()); BiomeManager.addVillageBiome(getBiome(), true); BiomeDictionary.addTypes(getBiome(), BiomeDictionary.Type.COLD, BiomeDictionary.Type.MAGICAL ); }