protected void ReadConfigSettings() { this.SettingsMode = ReadSettings(TCDefaultValues.SettingsMode); this.ModeTerrain = ReadSettings(TCDefaultValues.TerrainMode); this.ModeBiome = ReadSettings(TCDefaultValues.BiomeMode); this.worldHeightBits = ReadSettings(TCDefaultValues.WorldHeightBits); this.worldHeightBits = CheckValue(this.worldHeightBits, 5, 8); this.WorldHeight = 1 << worldHeightBits; this.waterLevelMax = WorldHeight / 2; this.GenerationDepth = ReadSettings(TCDefaultValues.GenerationDepth); this.BiomeRarityScale = ReadSettings(TCDefaultValues.BiomeRarityScale); this.LandRarity = ReadSettings(TCDefaultValues.LandRarity); this.LandSize = ReadSettings(TCDefaultValues.LandSize); this.LandFuzzy = ReadSettings(TCDefaultValues.LandFuzzy); this.IceRarity = ReadSettings(TCDefaultValues.IceRarity); this.IceSize = ReadSettings(TCDefaultValues.IceSize); this.RiverRarity = ReadSettings(TCDefaultValues.RiverRarity); this.RiverSize = ReadSettings(TCDefaultValues.RiverSize); this.RiversEnabled = ReadSettings(TCDefaultValues.RiversEnabled); this.FrozenRivers = ReadSettings(TCDefaultValues.FrozenRivers); this.FrozenOcean = ReadSettings(TCDefaultValues.FrozenOcean); this.NormalBiomes = ReadSettings(TCDefaultValues.NormalBiomes); this.IceBiomes = ReadSettings(TCDefaultValues.IceBiomes); this.IsleBiomes = ReadSettings(TCDefaultValues.IsleBiomes); this.BorderBiomes = ReadSettings(TCDefaultValues.BorderBiomes); ReadCustomBiomes(); this.imageMode = ReadSettings(TCDefaultValues.ImageMode); this.imageFile = this.ReadSettings(TCDefaultValues.ImageFile); this.imageFillBiome = this.ReadSettings(TCDefaultValues.ImageFillBiome); this.imageXOffset = this.ReadSettings(TCDefaultValues.ImageXOffset); this.imageZOffset = this.ReadSettings(TCDefaultValues.ImageZOffset); this.oldBiomeSize = ReadSettings(TCDefaultValues.oldBiomeSize); this.minMoisture = ReadSettings(TCDefaultValues.minMoisture); this.maxMoisture = ReadSettings(TCDefaultValues.maxMoisture); this.minTemperature = ReadSettings(TCDefaultValues.minTemperature); this.maxTemperature = ReadSettings(TCDefaultValues.maxTemperature); this.WorldFog = ReadSettings(TCDefaultValues.WorldFog); this.WorldNightFog = ReadSettings(TCDefaultValues.WorldNightFog); this.WorldFogR = ((WorldFog & 0xFF0000) >> 16) / 255F; this.WorldFogG = ((WorldFog & 0xFF00) >> 8) / 255F; this.WorldFogB = (WorldFog & 0xFF) / 255F; this.WorldNightFogR = ((WorldNightFog & 0xFF0000) >> 16) / 255F; this.WorldNightFogG = ((WorldNightFog & 0xFF00) >> 8) / 255F; this.WorldNightFogB = (WorldNightFog & 0xFF) / 255F; this.StrongholdsEnabled = ReadSettings(TCDefaultValues.StrongholdsEnabled); this.VillagesEnabled = ReadSettings(TCDefaultValues.VillagesEnabled); this.MineshaftsEnabled = ReadSettings(TCDefaultValues.MineshaftsEnabled); this.PyramidsEnabled = ReadSettings(TCDefaultValues.PyramidsEnabled); this.NetherFortress = ReadSettings(TCDefaultValues.NetherFortressEnabled); this.caveRarity = ReadSettings(TCDefaultValues.caveRarity); this.caveFrequency = ReadSettings(TCDefaultValues.caveFrequency); this.caveMinAltitude = ReadSettings(TCDefaultValues.caveMinAltitude); this.caveMaxAltitude = ReadSettings(TCDefaultValues.caveMaxAltitude); this.individualCaveRarity = ReadSettings(TCDefaultValues.individualCaveRarity); this.caveSystemFrequency = ReadSettings(TCDefaultValues.caveSystemFrequency); this.caveSystemPocketChance = ReadSettings(TCDefaultValues.caveSystemPocketChance); this.caveSystemPocketMinSize = ReadSettings(TCDefaultValues.caveSystemPocketMinSize); this.caveSystemPocketMaxSize = ReadSettings(TCDefaultValues.caveSystemPocketMaxSize); this.evenCaveDistribution = ReadSettings(TCDefaultValues.evenCaveDistribution); this.canyonRarity = ReadSettings(TCDefaultValues.canyonRarity); this.canyonMinAltitude = ReadSettings(TCDefaultValues.canyonMinAltitude); this.canyonMaxAltitude = ReadSettings(TCDefaultValues.canyonMaxAltitude); this.canyonMinLength = ReadSettings(TCDefaultValues.canyonMinLength); this.canyonMaxLength = ReadSettings(TCDefaultValues.canyonMaxLength); this.canyonDepth = ReadSettings(TCDefaultValues.canyonDepth); this.waterLevelMax = ReadSettings(TCDefaultValues.WaterLevelMax); this.waterLevelMin = ReadSettings(TCDefaultValues.WaterLevelMin); this.waterBlock = ReadSettings(TCDefaultValues.WaterBlock); this.iceBlock = ReadSettings(TCDefaultValues.IceBlock); this.fractureHorizontal = ReadSettings(TCDefaultValues.FractureHorizontal); this.fractureVertical = ReadSettings(TCDefaultValues.FractureVertical); this.disableBedrock = ReadSettings(TCDefaultValues.DisableBedrock); this.ceilingBedrock = ReadSettings(TCDefaultValues.CeilingBedrock); this.flatBedrock = ReadSettings(TCDefaultValues.FlatBedrock); this.bedrockBlock = ReadSettings(TCDefaultValues.BedrockobBlock); this.removeSurfaceStone = ReadSettings(TCDefaultValues.RemoveSurfaceStone); this.oldTerrainGenerator = this.ModeTerrain == TerrainMode.OldGenerator; this.objectSpawnRatio = this.ReadSettings(TCDefaultValues.objectSpawnRatio); /*this.customObjects = this.ReadSettings(TCDefaultValues.CustomObjects.name(), TCDefaultValues.CustomObjects.booleanValue()); this.denyObjectsUnderFill = this.ReadSettings(TCDefaultValues.DenyObjectsUnderFill.name(), TCDefaultValues.DenyObjectsUnderFill.booleanValue()); this.customTreeChance = this.ReadSettings(TCDefaultValues.customTreeChance.name(), TCDefaultValues.customTreeChance.intValue()); */ }
@Override protected void readConfigSettings() { // Main modes this.SettingsMode = readSettings(TCDefaultValues.SettingsMode); this.ModeTerrain = readSettings(TCDefaultValues.TerrainMode); this.biomeMode = TerrainControl.getBiomeModeManager() .getBiomeManager((String) readSettings(TCDefaultValues.BiomeMode)); // World and water height this.worldHeightBits = readSettings(TCDefaultValues.WorldHeightBits); this.worldHeightBits = applyBounds(this.worldHeightBits, 5, 8); this.WorldHeight = 1 << worldHeightBits; this.waterLevelMax = WorldHeight / 2 - 1; // Biome placement this.GenerationDepth = readSettings(TCDefaultValues.GenerationDepth); this.BiomeRarityScale = readSettings(TCDefaultValues.BiomeRarityScale); this.LandRarity = readSettings(TCDefaultValues.LandRarity); this.LandSize = readSettings(TCDefaultValues.LandSize); this.LandFuzzy = readSettings(TCDefaultValues.LandFuzzy); this.IceRarity = readSettings(TCDefaultValues.IceRarity); this.IceSize = readSettings(TCDefaultValues.IceSize); this.RiverRarity = readSettings(TCDefaultValues.RiverRarity); this.RiverSize = readSettings(TCDefaultValues.RiverSize); this.RiversEnabled = readSettings(TCDefaultValues.RiversEnabled); this.FrozenOcean = readSettings(TCDefaultValues.FrozenOcean); // Biomes this.NormalBiomes = readSettings(TCDefaultValues.NormalBiomes); this.IceBiomes = readSettings(TCDefaultValues.IceBiomes); this.IsleBiomes = readSettings(TCDefaultValues.IsleBiomes); this.BorderBiomes = readSettings(TCDefaultValues.BorderBiomes); ReadCustomBiomes(); // Images this.imageMode = readSettings(TCDefaultValues.ImageMode); this.imageFile = this.readSettings(TCDefaultValues.ImageFile); this.imageFillBiome = this.readSettings(TCDefaultValues.ImageFillBiome); this.imageXOffset = this.readSettings(TCDefaultValues.ImageXOffset); this.imageZOffset = this.readSettings(TCDefaultValues.ImageZOffset); // Old biomes this.oldBiomeSize = readSettings(TCDefaultValues.oldBiomeSize); this.minMoisture = readSettings(TCDefaultValues.minMoisture); this.maxMoisture = readSettings(TCDefaultValues.maxMoisture); this.minTemperature = readSettings(TCDefaultValues.minTemperature); this.maxTemperature = readSettings(TCDefaultValues.maxTemperature); // Fog this.WorldFog = readSettings(TCDefaultValues.WorldFog); this.WorldNightFog = readSettings(TCDefaultValues.WorldNightFog); this.WorldFogR = ((WorldFog & 0xFF0000) >> 16) / 255F; this.WorldFogG = ((WorldFog & 0xFF00) >> 8) / 255F; this.WorldFogB = (WorldFog & 0xFF) / 255F; this.WorldNightFogR = ((WorldNightFog & 0xFF0000) >> 16) / 255F; this.WorldNightFogG = ((WorldNightFog & 0xFF00) >> 8) / 255F; this.WorldNightFogB = (WorldNightFog & 0xFF) / 255F; // Structures this.strongholdsEnabled = readSettings(TCDefaultValues.StrongholdsEnabled); this.strongholdCount = readSettings(TCDefaultValues.StrongholdCount); this.strongholdDistance = readSettings(TCDefaultValues.StrongholdDistance); this.strongholdSpread = readSettings(TCDefaultValues.StrongholdSpread); this.villagesEnabled = readSettings(TCDefaultValues.VillagesEnabled); this.villageDistance = readSettings(TCDefaultValues.VillageDistance); this.villageSize = readSettings(TCDefaultValues.VillageSize); this.rareBuildingsEnabled = readSettings(TCDefaultValues.RareBuildingsEnabled); this.minimumDistanceBetweenRareBuildings = readSettings(TCDefaultValues.MinimumDistanceBetweenRareBuildings); this.maximumDistanceBetweenRareBuildings = readSettings(TCDefaultValues.MaximumDistanceBetweenRareBuildings); this.mineshaftsEnabled = readSettings(TCDefaultValues.MineshaftsEnabled); this.netherFortressesEnabled = readSettings(TCDefaultValues.NetherFortressesEnabled); // Caves this.caveRarity = readSettings(TCDefaultValues.caveRarity); this.caveFrequency = readSettings(TCDefaultValues.caveFrequency); this.caveMinAltitude = readSettings(TCDefaultValues.caveMinAltitude); this.caveMaxAltitude = readSettings(TCDefaultValues.caveMaxAltitude); this.individualCaveRarity = readSettings(TCDefaultValues.individualCaveRarity); this.caveSystemFrequency = readSettings(TCDefaultValues.caveSystemFrequency); this.caveSystemPocketChance = readSettings(TCDefaultValues.caveSystemPocketChance); this.caveSystemPocketMinSize = readSettings(TCDefaultValues.caveSystemPocketMinSize); this.caveSystemPocketMaxSize = readSettings(TCDefaultValues.caveSystemPocketMaxSize); this.evenCaveDistribution = readSettings(TCDefaultValues.evenCaveDistribution); // Canyons this.canyonRarity = readSettings(TCDefaultValues.canyonRarity); this.canyonMinAltitude = readSettings(TCDefaultValues.canyonMinAltitude); this.canyonMaxAltitude = readSettings(TCDefaultValues.canyonMaxAltitude); this.canyonMinLength = readSettings(TCDefaultValues.canyonMinLength); this.canyonMaxLength = readSettings(TCDefaultValues.canyonMaxLength); this.canyonDepth = readSettings(TCDefaultValues.canyonDepth); // Water this.waterLevelMax = readSettings(TCDefaultValues.WaterLevelMax); this.waterLevelMin = readSettings(TCDefaultValues.WaterLevelMin); this.waterBlock = readSettings(TCDefaultValues.WaterBlock); this.iceBlock = readSettings(TCDefaultValues.IceBlock); // Fracture this.fractureHorizontal = readSettings(TCDefaultValues.FractureHorizontal); this.fractureVertical = readSettings(TCDefaultValues.FractureVertical); // Bedrock this.disableBedrock = readSettings(TCDefaultValues.DisableBedrock); this.ceilingBedrock = readSettings(TCDefaultValues.CeilingBedrock); this.flatBedrock = readSettings(TCDefaultValues.FlatBedrock); this.bedrockBlock = readSettings(TCDefaultValues.BedrockobBlock); // Misc this.removeSurfaceStone = readSettings(TCDefaultValues.RemoveSurfaceStone); this.objectSpawnRatio = this.readSettings(TCDefaultValues.objectSpawnRatio); this.oldTerrainGenerator = this.ModeTerrain == TerrainMode.OldGenerator; }