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 ;
2013-11-13 01:55:01 +00:00
public static boolean stoneFormationGen ;
2013-09-14 10:16:39 +00:00
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 ;
2013-09-21 18:44:04 +00:00
public static boolean witherWartGen ;
public static boolean burningBlossomGen ;
2013-09-14 10:16:39 +00:00
public static int villageDistance ;
2013-10-26 16:44:05 +00:00
public static int landmassPercentage ;
2013-09-14 10:16:39 +00:00
// Village biomes
2013-09-21 13:57:55 +00:00
public static boolean alpsVillage ;
2013-09-14 10:16:39 +00:00
public static boolean arcticVillage ;
2013-09-21 13:57:55 +00:00
public static boolean autumnHillsVillage ;
public static boolean badlandsVillage ;
public static boolean bambooForestVillage ;
public static boolean bayouVillage ;
2013-09-15 21:03:29 +00:00
public static boolean birchForestVillage ;
2013-09-21 13:57:55 +00:00
public static boolean bogVillage ;
public static boolean borealForestVillage ;
2013-09-14 10:16:39 +00:00
public static boolean brushlandVillage ;
2013-09-21 13:57:55 +00:00
public static boolean canyonVillage ;
2013-09-14 10:16:39 +00:00
public static boolean chaparralVillage ;
2013-09-21 13:57:55 +00:00
public static boolean cherryBlossomGroveVillage ;
2013-09-15 18:58:32 +00:00
public static boolean coniferousForestVillage ;
public static boolean coniferousForestSnowVillage ;
2013-09-21 13:57:55 +00:00
public static boolean cragVillage ;
public static boolean deadForestVillage ;
public static boolean deadForestSnowVillage ;
public static boolean deadSwampVillage ;
public static boolean deadlandsVillage ;
2013-09-15 18:58:32 +00:00
public static boolean deciduousForestVillage ;
2013-09-21 13:57:55 +00:00
public static boolean dunesVillage ;
public static boolean fenVillage ;
2013-09-14 10:16:39 +00:00
public static boolean fieldVillage ;
2013-09-21 13:57:55 +00:00
public static boolean frostForestVillage ;
public static boolean fungiForestVillage ;
public static boolean gardenVillage ;
public static boolean glacierVillage ;
2013-09-14 10:16:39 +00:00
public static boolean grasslandVillage ;
public static boolean groveVillage ;
public static boolean heathlandVillage ;
2013-09-21 13:57:55 +00:00
public static boolean highlandVillage ;
public static boolean hotSpringsVillage ;
public static boolean icyHillsVillage ;
public static boolean jadeCliffsVillage ;
2013-09-14 10:16:39 +00:00
public static boolean lushDesertVillage ;
public static boolean lushSwampVillage ;
2013-09-21 13:57:55 +00:00
public static boolean mangroveVillage ;
2013-09-15 18:58:32 +00:00
public static boolean mapleWoodsVillage ;
2013-09-21 13:57:55 +00:00
public static boolean marshVillage ;
2013-09-14 10:16:39 +00:00
public static boolean meadowVillage ;
2013-09-21 13:57:55 +00:00
public static boolean mesaVillage ;
public static boolean moorVillage ;
public static boolean mountainVillage ;
public static boolean mysticGroveVillage ;
public static boolean oasisVillage ;
public static boolean ominousWoodsVillage ;
public static boolean orchardVillage ;
public static boolean originValleyVillage ;
2013-09-14 10:16:39 +00:00
public static boolean outbackVillage ;
public static boolean overgrownGreensVillage ;
2013-09-21 13:57:55 +00:00
public static boolean pastureVillage ;
public static boolean polarVillage ;
2013-09-14 10:16:39 +00:00
public static boolean prairieVillage ;
2013-09-21 13:57:55 +00:00
public static boolean quagmireVillage ;
public static boolean rainforestVillage ;
public static boolean redwoodForestVillage ;
public static boolean sacredSpringsVillage ;
2013-09-14 10:16:39 +00:00
public static boolean savannaVillage ;
public static boolean scrublandVillage ;
2013-09-21 13:57:55 +00:00
public static boolean seasonalForestVillage ;
public static boolean shieldVillage ;
2013-09-14 10:16:39 +00:00
public static boolean shrublandVillage ;
2013-09-21 13:57:55 +00:00
public static boolean silkgladesVillage ;
public static boolean sludgepitVillage ;
2013-09-14 10:16:39 +00:00
public static boolean spruceWoodsVillage ;
public static boolean steppeVillage ;
2013-09-21 13:57:55 +00:00
public static boolean temperateRainforestVillage ;
public static boolean thicketVillage ;
2013-09-14 10:16:39 +00:00
public static boolean timberVillage ;
public static boolean tropicalRainforestVillage ;
2013-09-21 13:57:55 +00:00
public static boolean tropicsVillage ;
2013-09-14 10:16:39 +00:00
public static boolean tundraVillage ;
2013-09-21 13:57:55 +00:00
public static boolean volcanoVillage ;
public static boolean wastelandVillage ;
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-21 13:57:55 +00:00
public static boolean extremeHillsVillage ;
2013-09-15 18:58:32 +00:00
public static boolean forestVillage ;
2013-09-21 13:57:55 +00:00
public static boolean taigaVillage ;
public static boolean swamplandVillage ;
public static boolean jungleVillage ;
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 ) ;
2013-11-13 01:55:01 +00:00
stoneFormationGen = config . get ( " Decoration Settings " , " Generate Stone Formations " , true , " Stalagmites, stalactites, etc. " ) . getBoolean ( true ) ;
2013-09-14 10:16:39 +00:00
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 ) ;
2013-09-21 18:44:04 +00:00
witherWartGen = config . get ( " Decoration Settings " , " Generate Wither Wart " , true ) . getBoolean ( true ) ;
burningBlossomGen = config . get ( " Decoration Settings " , " Generate Burning Blossoms " , true ) . getBoolean ( true ) ;
2013-09-14 10:16:39 +00:00
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 ;
}
2013-10-26 16:44:05 +00:00
landmassPercentage = config . get ( " Biomes O \ ' Plenty World Type Settings " , " Landmass Percentage " , 10 , " In Vanilla it is set to 10. Takes values from 0 to 100. " ) . getInt ( ) ;
2013-09-14 10:16:39 +00:00
// Biomes with villages
2013-09-21 13:57:55 +00:00
alpsVillage = config . get ( " Allow Villages " , " Alps " , false ) . getBoolean ( false ) ;
2013-09-14 10:16:39 +00:00
arcticVillage = config . get ( " Allow Villages " , " Arctic " , true ) . getBoolean ( false ) ;
2013-09-21 13:57:55 +00:00
autumnHillsVillage = config . get ( " Allow Villages " , " AutumnHills " , false ) . getBoolean ( false ) ;
badlandsVillage = config . get ( " Allow Villages " , " Badlands " , false ) . getBoolean ( false ) ;
bambooForestVillage = config . get ( " Allow Villages " , " BambooForest " , false ) . getBoolean ( false ) ;
bayouVillage = config . get ( " Allow Villages " , " Bayou " , false ) . getBoolean ( false ) ;
2013-09-15 21:03:29 +00:00
birchForestVillage = config . get ( " Allow Villages " , " BirchForest " , true ) . getBoolean ( false ) ;
2013-09-21 13:57:55 +00:00
bogVillage = config . get ( " Allow Villages " , " Bog " , false ) . getBoolean ( false ) ;
borealForestVillage = config . get ( " Allow Villages " , " BorealForest " , false ) . getBoolean ( false ) ;
2013-09-14 10:16:39 +00:00
brushlandVillage = config . get ( " Allow Villages " , " Brushland " , true ) . getBoolean ( false ) ;
2013-09-21 13:57:55 +00:00
canyonVillage = config . get ( " Allow Villages " , " Canyon " , false ) . getBoolean ( false ) ;
2013-09-14 10:16:39 +00:00
chaparralVillage = config . get ( " Allow Villages " , " Chaparral " , true ) . getBoolean ( false ) ;
2013-09-21 13:57:55 +00:00
cherryBlossomGroveVillage = config . get ( " Allow Villages " , " CherryBlossomGrove " , false ) . getBoolean ( false ) ;
2013-09-15 18:58:32 +00:00
coniferousForestVillage = config . get ( " Allow Villages " , " ConiferousForest " , true ) . getBoolean ( false ) ;
2013-09-21 13:57:55 +00:00
coniferousForestSnowVillage = config . get ( " Allow Villages " , " ConiferousForestSnow " , true ) . getBoolean ( false ) ;
//cragVillage = config.get("Allow Villages", "Crag", false).getBoolean(false);
deadForestVillage = config . get ( " Allow Villages " , " DeadForest " , false ) . getBoolean ( false ) ;
deadForestSnowVillage = config . get ( " Allow Villages " , " DeadForestSnow " , false ) . getBoolean ( false ) ;
deadSwampVillage = config . get ( " Allow Villages " , " DeadSwamp " , false ) . getBoolean ( false ) ;
//deadlandsVillage = config.get("Allow Villages", "Deadlands", false).getBoolean(false);
2013-09-15 18:58:32 +00:00
deciduousForestVillage = config . get ( " Allow Villages " , " DeciduousForest " , true ) . getBoolean ( false ) ;
2013-09-21 13:57:55 +00:00
dunesVillage = config . get ( " Allow Villages " , " Dunes " , false ) . getBoolean ( false ) ;
fenVillage = config . get ( " Allow Villages " , " Fen " , false ) . getBoolean ( false ) ;
2013-09-14 10:16:39 +00:00
fieldVillage = config . get ( " Allow Villages " , " Field " , true ) . getBoolean ( false ) ;
2013-09-21 13:57:55 +00:00
frostForestVillage = config . get ( " Allow Villages " , " FrostForest " , true ) . getBoolean ( false ) ;
//fungiForestVillage = config.get("Allow Villages", "FungiForest", false).getBoolean(false);
//gardenVillage = config.get("Allow Villages", "Garden", false).getBoolean(false);
glacierVillage = config . get ( " Allow Villages " , " Glacier " , false ) . getBoolean ( false ) ;
2013-09-14 10:16:39 +00:00
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-21 13:57:55 +00:00
highlandVillage = config . get ( " Allow Villages " , " Highland " , false ) . getBoolean ( false ) ;
hotSpringsVillage = config . get ( " Allow Villages " , " HotSprings " , false ) . getBoolean ( false ) ;
//icyHillsVillage = config.get("Allow Villages", "IcyHills", false).getBoolean(false);
jadeCliffsVillage = config . get ( " Allow Villages " , " JadeCliffs " , false ) . 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-21 13:57:55 +00:00
mangroveVillage = config . get ( " Allow Villages " , " Mangrove " , false ) . getBoolean ( false ) ;
2013-09-15 18:58:32 +00:00
mapleWoodsVillage = config . get ( " Allow Villages " , " MapleWoods " , true ) . getBoolean ( false ) ;
2013-09-21 13:57:55 +00:00
marshVillage = config . get ( " Allow Villages " , " Marsh " , false ) . getBoolean ( false ) ;
2013-09-14 10:16:39 +00:00
meadowVillage = config . get ( " Allow Villages " , " Meadow " , true ) . getBoolean ( false ) ;
2013-09-21 13:57:55 +00:00
mesaVillage = config . get ( " Allow Villages " , " Mesa " , false ) . getBoolean ( false ) ;
moorVillage = config . get ( " Allow Villages " , " Moor " , false ) . getBoolean ( false ) ;
mountainVillage = config . get ( " Allow Villages " , " Mountain " , false ) . getBoolean ( false ) ;
//mysticGroveVillage = config.get("Allow Villages", "MysticGrove", false).getBoolean(false);
oasisVillage = config . get ( " Allow Villages " , " Oasis " , false ) . getBoolean ( false ) ;
//ominousWoodsVillage = config.get("Allow Villages", "OminousWoods", false).getBoolean(false);
orchardVillage = config . get ( " Allow Villages " , " Orchard " , false ) . getBoolean ( false ) ;
//originValleyVillage = config.get("Allow Villages", "OriginValley", false).getBoolean(false);
2013-09-14 10:16:39 +00:00
outbackVillage = config . get ( " Allow Villages " , " Outback " , true ) . getBoolean ( false ) ;
overgrownGreensVillage = config . get ( " Allow Villages " , " OvergrownGreens " , true ) . getBoolean ( false ) ;
2013-09-21 13:57:55 +00:00
pastureVillage = config . get ( " Allow Villages " , " Pasture " , false ) . getBoolean ( false ) ;
polarVillage = config . get ( " Allow Villages " , " Polar " , false ) . getBoolean ( false ) ;
2013-09-14 10:16:39 +00:00
prairieVillage = config . get ( " Allow Villages " , " Prairie " , true ) . getBoolean ( false ) ;
2013-09-21 13:57:55 +00:00
quagmireVillage = config . get ( " Allow Villages " , " Quagmire " , false ) . getBoolean ( false ) ;
rainforestVillage = config . get ( " Allow Villages " , " Rainforest " , false ) . getBoolean ( false ) ;
redwoodForestVillage = config . get ( " Allow Villages " , " RedwoodForest " , false ) . getBoolean ( false ) ;
//sacredSpringsVillage = config.get("Allow Villages", "SacredSprings", false).getBoolean(false);
2013-09-14 10:16:39 +00:00
savannaVillage = config . get ( " Allow Villages " , " Savanna " , true ) . getBoolean ( false ) ;
scrublandVillage = config . get ( " Allow Villages " , " Scrubland " , true ) . getBoolean ( false ) ;
2013-09-21 13:57:55 +00:00
seasonalForestVillage = config . get ( " Allow Villages " , " SeasonalForest " , false ) . getBoolean ( false ) ;
shieldVillage = config . get ( " Allow Villages " , " Shield " , false ) . getBoolean ( false ) ;
2013-09-14 10:16:39 +00:00
shrublandVillage = config . get ( " Allow Villages " , " Shrubland " , true ) . getBoolean ( false ) ;
2013-09-21 13:57:55 +00:00
//silkgladesVillage = config.get("Allow Villages", "Silkgladess", false).getBoolean(false);
sludgepitVillage = config . get ( " Allow Villages " , " Sludgepit " , false ) . 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-21 13:57:55 +00:00
temperateRainforestVillage = config . get ( " Allow Villages " , " TemperateRainforest " , false ) . getBoolean ( false ) ;
thicketVillage = config . get ( " Allow Villages " , " Thicket " , false ) . 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 ) ;
2013-09-21 13:57:55 +00:00
tropicsVillage = config . get ( " Allow Villages " , " Tropics " , false ) . getBoolean ( false ) ;
2013-09-14 10:16:39 +00:00
tundraVillage = config . get ( " Allow Villages " , " Tundra " , true ) . getBoolean ( false ) ;
2013-09-21 13:57:55 +00:00
volcanoVillage = config . get ( " Allow Villages " , " Volcano " , false ) . getBoolean ( false ) ;
//wastelandVillage = config.get("Allow Villages", "Wasteland", false).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-21 13:57:55 +00:00
extremeHillsVillage = config . get ( " Allow Villages " , " ExtremeHills " , false ) . getBoolean ( false ) ;
forestVillage = config . get ( " Allow Villages " , " Forest " , false ) . getBoolean ( false ) ;
jungleVillage = config . get ( " Allow Villages " , " Jungle " , false ) . getBoolean ( false ) ;
2013-09-14 10:16:39 +00:00
plainsVillage = config . get ( " Allow Villages " , " Plains " , true ) . getBoolean ( true ) ;
2013-09-21 13:57:55 +00:00
swamplandVillage = config . get ( " Allow Villages " , " Swampland " , false ) . getBoolean ( false ) ;
taigaVillage = config . get ( " Allow Villages " , " Taiga " , false ) . getBoolean ( false ) ;
2013-09-14 10:16:39 +00:00
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
}