Yeah... I'm uncomfortable with this being configurable
This commit is contained in:
parent
57b0baafaa
commit
64842d83b1
2 changed files with 0 additions and 50 deletions
|
@ -2,7 +2,6 @@ package biomesoplenty;
|
|||
|
||||
import biomesoplenty.common.configuration.BOPConfiguration;
|
||||
import biomesoplenty.common.configuration.BOPConfigurationBiomeGen;
|
||||
import biomesoplenty.common.configuration.BOPConfigurationWorldFeatures;
|
||||
import biomesoplenty.common.configuration.structures.BOPConfigurationStrongholds;
|
||||
import biomesoplenty.common.configuration.structures.BOPConfigurationVillages;
|
||||
import biomesoplenty.common.core.*;
|
||||
|
@ -56,7 +55,6 @@ public class BiomesOPlenty
|
|||
BOPBiomes.init();
|
||||
BOPConfigurationVillages.init(BOPConfiguration.villagesConfigFile);
|
||||
BOPConfigurationStrongholds.init(BOPConfiguration.strongholdsConfigFile);
|
||||
BOPConfigurationWorldFeatures.init(BOPConfiguration.worldFeaturesConfigFile);
|
||||
BiomeTweaker.init();
|
||||
BOPEntities.init();
|
||||
BOPVanillaCompat.init();
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
package biomesoplenty.common.configuration;
|
||||
|
||||
import biomesoplenty.common.world.generation.WorldGenFieldAssociation;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class BOPConfigurationWorldFeatures
|
||||
{
|
||||
public static Configuration config;
|
||||
|
||||
public static void init(File configFile)
|
||||
{
|
||||
config = new Configuration(configFile);
|
||||
|
||||
try
|
||||
{
|
||||
config.load();
|
||||
|
||||
for (Entry<String, WorldGenFieldAssociation.WorldFeature> entry : WorldGenFieldAssociation.featureMap.entrySet())
|
||||
{
|
||||
String key = entry.getKey();
|
||||
|
||||
boolean featureEnabled = true;
|
||||
|
||||
featureEnabled = config.get("World Features", key.replace("PerChunk", "Generation"), true).getBoolean(true);
|
||||
|
||||
if (!featureEnabled)
|
||||
{
|
||||
WorldGenFieldAssociation.featureMap.remove(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
FMLLog.log(Level.ERROR, "Biomes O Plenty has had a problem loading its configuration", e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (config.hasChanged()) {
|
||||
config.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue