예제 #1
0
  private static void createBiomes() throws InstantiationException, IllegalAccessException {
    for (final VanillaBiome biome : VanillaBiome.values()) {
      final BiomeGenBase biomeGen = biome.toBiomeGen();
      if (!biome.enableGeneration) {
        Extrabiomes.proxy.removeBiome(biomeGen);
        ExtrabiomesLog.info("Vanilla biome %s disabled.", biome.toString());
      }

      VillageSpawnHelper.setVillageSpawn(biomeGen, biome.enableVillages);
      ExtrabiomesLog.info(
          "Village spawning %s for vanilla biome %s.",
          biome.enableVillages ? "enabled" : "disabled", biome.toString());
    }
  }
예제 #2
0
  private static void loadSettings(ExtrabiomesConfig config) {
    settingsLoaded = true;

    for (final VanillaBiome biome : VanillaBiome.values()) {

      Property property = config.get(ExtrabiomesConfig.CATEGORY_BIOME, biome.enabledKey(), true);
      if (property.getBoolean(false)) biome.enableGeneration = true;

      property = config.get(ExtrabiomesConfig.CATEGORY_BIOME, biome.villagesKey(), true);
      if (property.getBoolean(false)) biome.enableVillages = true;
    }
  }