Java tutorial
/******************************************************************************* * Copyright 2014, the Biomes O' Plenty Team * * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License. * * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ package biomesoplenty.common.config; import java.io.File; import net.minecraft.world.biome.BiomeGenBase; import org.apache.commons.io.FilenameUtils; import biomesoplenty.common.util.biome.BiomeConfigUtil; public class ModConfiguration { public static void load() { loadBiomes(); } private static void loadBiomes() { for (BiomeGenBase biome : BiomeGenBase.getBiomeGenArray()) { if (biome != null) { BiomeConfiguration biomeConfiguration = BiomeConfiguration.getInstance(biome); biomeConfiguration.update(); BiomeConfigUtil.configureBiome(biome, biomeConfiguration); } } for (File file : BiomeConfigUtil.getBiomeConfigDirectory().listFiles()) { if (FilenameUtils.getExtension(file.getName()).equals("cfg")) { System.out.println("Found custom config: " + file.getName()); } } } }