2013-09-14 10:16:39 +00:00
|
|
|
package biomesoplenty.configuration.configfile;
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
import java.util.logging.Level;
|
|
|
|
|
|
|
|
import net.minecraftforge.common.Configuration;
|
|
|
|
import cpw.mods.fml.common.FMLCommonHandler;
|
|
|
|
import cpw.mods.fml.common.FMLLog;
|
|
|
|
|
|
|
|
public class BOPConfigurationTerrainGen
|
|
|
|
{
|
|
|
|
public static Configuration config;
|
|
|
|
|
2013-09-14 11:03:33 +00:00
|
|
|
public static int biomeSize;
|
2013-09-14 10:16:39 +00:00
|
|
|
public static boolean addToDefault;
|
|
|
|
public static boolean vanillaEnhanced;
|
|
|
|
public static boolean netherOverride;
|
|
|
|
public static boolean pumpkinGen;
|
|
|
|
public static boolean poisonIvyGen;
|
|
|
|
public static boolean thornGen;
|
|
|
|
public static boolean springWaterGen;
|
|
|
|
public static boolean poisonWaterGen;
|
|
|
|
public static boolean quicksandGen;
|
|
|
|
public static boolean exposedStone;
|
|
|
|
|
|
|
|
public static int villageDistance;
|
|
|
|
|
|
|
|
// Village biomes
|
|
|
|
public static boolean arcticVillage;
|
2013-09-15 21:03:29 +00:00
|
|
|
public static boolean birchForestVillage;
|
2013-09-14 10:16:39 +00:00
|
|
|
public static boolean brushlandVillage;
|
|
|
|
public static boolean chaparralVillage;
|
2013-09-15 18:58:32 +00:00
|
|
|
public static boolean coniferousForestVillage;
|
|
|
|
public static boolean coniferousForestSnowVillage;
|
|
|
|
public static boolean deciduousForestVillage;
|
|
|
|
public static boolean frostForestVillage;
|
2013-09-14 10:16:39 +00:00
|
|
|
public static boolean fieldVillage;
|
|
|
|
public static boolean grasslandVillage;
|
|
|
|
public static boolean groveVillage;
|
|
|
|
public static boolean heathlandVillage;
|
|
|
|
public static boolean lushDesertVillage;
|
|
|
|
public static boolean lushSwampVillage;
|
2013-09-15 18:58:32 +00:00
|
|
|
public static boolean mapleWoodsVillage;
|
2013-09-14 10:16:39 +00:00
|
|
|
public static boolean meadowVillage;
|
|
|
|
public static boolean outbackVillage;
|
|
|
|
public static boolean overgrownGreensVillage;
|
|
|
|
public static boolean prairieVillage;
|
|
|
|
public static boolean savannaVillage;
|
|
|
|
public static boolean scrublandVillage;
|
|
|
|
public static boolean shrublandVillage;
|
|
|
|
public static boolean spruceWoodsVillage;
|
|
|
|
public static boolean steppeVillage;
|
|
|
|
public static boolean timberVillage;
|
|
|
|
public static boolean tropicalRainforestVillage;
|
|
|
|
public static boolean tundraVillage;
|
2013-09-15 18:58:32 +00:00
|
|
|
public static boolean wetlandVillage;
|
|
|
|
public static boolean woodlandVillage;
|
2013-09-14 10:16:39 +00:00
|
|
|
public static boolean plainsVillage;
|
|
|
|
public static boolean desertVillage;
|
2013-09-15 18:58:32 +00:00
|
|
|
public static boolean forestVillage;
|
2013-09-14 10:16:39 +00:00
|
|
|
|
|
|
|
public static void init(File configFile)
|
|
|
|
{
|
|
|
|
config = new Configuration(configFile);
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
config.load();
|
|
|
|
|
2013-09-14 11:03:33 +00:00
|
|
|
biomeSize = config.get("Biomes O\' Plenty World Type Settings", "Biome Size", 4, "Default World Type has 4. Large Biomes World Type has 6.").getInt(4);
|
2013-09-14 10:16:39 +00:00
|
|
|
addToDefault = config.get("Biome Settings", "Add Biomes To Default World", false).getBoolean(true);
|
|
|
|
vanillaEnhanced = config.get("Biome Settings", "Enhanced Vanilla Biomes", true).getBoolean(false);
|
|
|
|
netherOverride = config.get("Dimension Settings", "Enable Nether Override", true).getBoolean(true);
|
|
|
|
pumpkinGen = config.get("Decoration Settings", "Generate Pumpkins Without Faces", true).getBoolean(true);
|
|
|
|
poisonIvyGen = config.get("Decoration Settings", "Generate Poison Ivy", true).getBoolean(true);
|
|
|
|
thornGen = config.get("Decoration Settings", "Generate Thorns", true).getBoolean(true);
|
|
|
|
springWaterGen = config.get("Decoration Settings", "Generate Hot Springs", true).getBoolean(true);
|
|
|
|
poisonWaterGen = config.get("Decoration Settings", "Generate Poison Pools", true).getBoolean(true);
|
|
|
|
quicksandGen = config.get("Decoration Settings", "Generate Quicksand", true).getBoolean(true);
|
|
|
|
exposedStone = config.get("Decoration Settings", "Generate Sections Of Exposed Stone", true).getBoolean(true);
|
|
|
|
|
|
|
|
villageDistance = config.get("Biomes O\' Plenty World Type Settings", "Distance between villages", 32, "In Vanilla it is set to 32").getInt();
|
|
|
|
if (villageDistance < 8)
|
|
|
|
{
|
|
|
|
villageDistance = 8;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Biomes with villages
|
|
|
|
arcticVillage = config.get("Allow Villages", "Arctic", true).getBoolean(false);
|
2013-09-15 21:03:29 +00:00
|
|
|
birchForestVillage = config.get("Allow Villages", "BirchForest", true).getBoolean(false);
|
2013-09-14 10:16:39 +00:00
|
|
|
brushlandVillage = config.get("Allow Villages", "Brushland", true).getBoolean(false);
|
|
|
|
chaparralVillage = config.get("Allow Villages", "Chaparral", true).getBoolean(false);
|
2013-09-15 18:58:32 +00:00
|
|
|
coniferousForestVillage = config.get("Allow Villages", "ConiferousForest", true).getBoolean(false);
|
|
|
|
coniferousForestSnowVillage = config.get("Allow Villages", "SnowyConiferousForest", true).getBoolean(false);
|
|
|
|
deciduousForestVillage = config.get("Allow Villages", "DeciduousForest", true).getBoolean(false);
|
|
|
|
frostForestVillage = config.get("Allow Villages", "FrostForest", true).getBoolean(false);
|
2013-09-14 10:16:39 +00:00
|
|
|
fieldVillage = config.get("Allow Villages", "Field", true).getBoolean(false);
|
|
|
|
grasslandVillage = config.get("Allow Villages", "Grassland", true).getBoolean(false);
|
|
|
|
groveVillage = config.get("Allow Villages", "Grove", true).getBoolean(false);
|
|
|
|
heathlandVillage = config.get("Allow Villages", "Heathland", true).getBoolean(false);
|
2013-09-18 18:05:48 +00:00
|
|
|
lushDesertVillage = config.get("Allow Villages", "LushDesert", true).getBoolean(false);
|
2013-09-15 03:38:04 +00:00
|
|
|
lushSwampVillage = config.get("Allow Villages", "LushSwamp", true).getBoolean(false);
|
2013-09-15 18:58:32 +00:00
|
|
|
mapleWoodsVillage = config.get("Allow Villages", "MapleWoods", true).getBoolean(false);
|
2013-09-14 10:16:39 +00:00
|
|
|
meadowVillage = config.get("Allow Villages", "Meadow", true).getBoolean(false);
|
|
|
|
outbackVillage = config.get("Allow Villages", "Outback", true).getBoolean(false);
|
|
|
|
overgrownGreensVillage = config.get("Allow Villages", "OvergrownGreens", true).getBoolean(false);
|
|
|
|
prairieVillage = config.get("Allow Villages", "Prairie", true).getBoolean(false);
|
|
|
|
savannaVillage = config.get("Allow Villages", "Savanna", true).getBoolean(false);
|
|
|
|
scrublandVillage = config.get("Allow Villages", "Scrubland", true).getBoolean(false);
|
|
|
|
shrublandVillage = config.get("Allow Villages", "Shrubland", true).getBoolean(false);
|
2013-09-15 03:38:04 +00:00
|
|
|
spruceWoodsVillage = config.get("Allow Villages", "SpruceWoods", true).getBoolean(false);
|
2013-09-14 10:16:39 +00:00
|
|
|
steppeVillage = config.get("Allow Villages", "Steppe", true).getBoolean(false);
|
2013-09-15 03:38:04 +00:00
|
|
|
timberVillage = config.get("Allow Villages", "Timber", true).getBoolean(false);
|
2013-09-14 10:16:39 +00:00
|
|
|
tropicalRainforestVillage = config.get("Allow Villages", "TropicalRainforest", true).getBoolean(false);
|
|
|
|
tundraVillage = config.get("Allow Villages", "Tundra", true).getBoolean(false);
|
2013-09-15 18:58:32 +00:00
|
|
|
wetlandVillage = config.get("Allow Villages", "Wetland", true).getBoolean(false);
|
|
|
|
woodlandVillage = config.get("Allow Villages", "Woodland", true).getBoolean(false);
|
2013-09-14 10:16:39 +00:00
|
|
|
|
|
|
|
// Vanilla biomes
|
|
|
|
desertVillage = config.get("Allow Villages", "Desert", true).getBoolean(true);
|
2013-09-15 18:58:32 +00:00
|
|
|
forestVillage = config.get("Allow Villages", "Forest", true).getBoolean(true);
|
2013-09-14 10:16:39 +00:00
|
|
|
plainsVillage = config.get("Allow Villages", "Plains", true).getBoolean(true);
|
|
|
|
|
|
|
|
FMLCommonHandler.instance().getFMLLogger().log(Level.INFO, "[BiomesOPlenty] Generated Terrain Gen Config!");
|
|
|
|
}
|
|
|
|
catch (Exception e)
|
|
|
|
{
|
|
|
|
FMLLog.log(Level.SEVERE, e, "Biomes O Plenty has had a problem loading its configuration");
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
{
|
|
|
|
if (config.hasChanged()) {
|
|
|
|
config.save();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-09-14 11:03:33 +00:00
|
|
|
}
|