protected void WriteConfigSettings() throws IOException {
    WriteTitle("Configuration settings");
    WriteComment("Possible configurations modes : WriteAll, WriteWithoutComments, WriteDisable");
    WriteComment("   WriteAll - default");
    WriteComment("   WriteWithoutComments - write config files without help comments");
    WriteComment("   WriteDisable - did not write anything, only read. Use with caution!");
    WriteValue(TCDefaultValues.SettingsMode.name(), this.SettingsMode.name());

    WriteTitle("World modes");
    WriteComment(
        "Possible terrain modes : Normal, OldGenerator, TerrainTest, NotGenerate, Default");
    WriteComment("   Normal - use all features");
    WriteComment("   OldGenerator - generate land like 1.7.3 generator");
    WriteComment("   TerrainTest - generate only terrain without any resources");
    WriteComment("   NotGenerate - generate empty chunks");
    WriteComment("   Default - use default Notch terrain generator");
    WriteValue(TCDefaultValues.TerrainMode.name(), this.ModeTerrain.name());
    WriteNewLine();
    WriteComment("Possible biome modes : Normal, OldGenerator, Default");
    WriteComment("   Normal - use all features");
    WriteComment("   FromImage - get biomes from image file");
    WriteComment("   OldGenerator - generate biome like 1.7.3 generator");
    WriteComment("   Default - use default Notch biome generator");
    WriteValue(TCDefaultValues.BiomeMode.name(), this.ModeBiome.name());

    WriteTitle("Biome Generator Variables");

    WriteComment(
        "IMPORTANT value for generation. Bigger values appear to zoom out. All 'Sizes' must be smaller than this.");
    WriteComment("Large %/total area biomes (Continents) must be set small, (limit=0)");
    WriteComment(
        "Small %/total area biomes (Oasis,Mountain Peaks) must be larger (limit=GenerationDepth)");
    WriteComment("This could also represent \"Total number of biome sizes\" ");
    WriteComment(
        "Small values (about 1-2) and Large values (about 20) may affect generator performance.");
    WriteValue(TCDefaultValues.GenerationDepth.name(), this.GenerationDepth);
    WriteNewLine();

    WriteComment(
        "Max biome rarity from 1 to infinity. By default this is 100, but you can raise it for");
    WriteComment(
        "fine-grained control, or to create biomes with a chance of occurring smaller than 1/100.");
    WriteValue(TCDefaultValues.BiomeRarityScale.name(), this.BiomeRarityScale);
    WriteNewLine();
    WriteComment(
        "Land rarity from 100 to 1. If you set smaller than 90 and LandSize near 0 beware Big oceans.");
    WriteValue(TCDefaultValues.LandRarity.name(), this.LandRarity);
    WriteNewLine();
    WriteComment("Land size from 0 to GenerationDepth.");
    WriteValue(TCDefaultValues.LandSize.name(), this.LandSize);
    WriteNewLine();
    WriteComment(
        "Make land more fuzzy and make lakes. Must be from 0 to GenerationDepth - LandSize");
    WriteValue(TCDefaultValues.LandFuzzy.name(), this.LandFuzzy);
    WriteNewLine();

    WriteComment(
        "Ice areas rarity from 100 to 1. If you set smaller than 90 and IceSize near 0 beware ice world");
    WriteValue(TCDefaultValues.IceRarity.name(), this.IceRarity);
    WriteNewLine();
    WriteComment("Ice area size from 0 to GenerationDepth.");
    WriteValue(TCDefaultValues.IceSize.name(), this.IceSize);
    WriteNewLine();

    WriteValue(TCDefaultValues.FrozenRivers.name(), this.FrozenRivers);
    WriteNewLine();
    WriteValue(TCDefaultValues.FrozenOcean.name(), this.FrozenOcean);
    WriteNewLine();

    WriteComment("River rarity.Must be from 0 to GenerationDepth.");
    WriteValue(TCDefaultValues.RiverRarity.name(), this.RiverRarity);
    WriteNewLine();
    WriteComment("River size from 0 to GenerationDepth - RiverRarity");
    WriteValue(TCDefaultValues.RiverSize.name(), this.RiverSize);
    WriteNewLine();
    WriteValue(TCDefaultValues.RiversEnabled.name(), this.RiversEnabled);
    WriteNewLine();

    WriteComment("Biomes which used in normal biome algorithm. Biome name is case sensitive.");
    WriteValue(TCDefaultValues.NormalBiomes.name(), this.NormalBiomes);
    WriteNewLine();
    WriteComment("Biomes which used in ice biome algorithm. Biome name is case sensitive.");
    WriteValue(TCDefaultValues.IceBiomes.name(), this.IceBiomes);
    WriteNewLine();
    WriteComment(
        "Biomes which used as isles. You must set IsleInBiome in biome config for each biome here. Biome name is case sensitive.");
    WriteValue(TCDefaultValues.IsleBiomes.name(), this.IsleBiomes);
    WriteNewLine();
    WriteComment(
        "Biomes which used as borders. You must set BiomeIsBorder in biome config for each biome here. Biome name is case sensitive.");
    WriteValue(TCDefaultValues.BorderBiomes.name(), this.BorderBiomes);

    WriteNewLine(); // TODO Write correct help
    WriteComment("List of ALL custom biomes.");
    WriteComment("Example: ");
    WriteComment("  CustomBiomes:TestBiome1, BiomeTest2");
    WriteComment("This will add two biomes and generate biome config files");
    WriteComment("Any changes here need server restart.");
    /*
           WriteComment("The id of the biome must be unique for all biomes on the server.");
    WriteComment("The available id's range from "+idMin+" to "+idMax+" and the first 0 to "+(DefaultBiome.values().length-1)+" is occupied by vanilla minecraft biomes.");
    WriteComment("To leave room for future vanilla biomes we suggest your custom biomes start at id "+idSuggestedCustomMin+".");
    WriteComment("The id for the biome will be saved to disc together with the chunk data (new feature since the Anvil map format).");
    WriteComment("This means that if you change the biome id after you generated your map, the ids in the map wont change.");
    WriteComment("Orphaned ids are interpreted as id 1 = Plains. Example things that depend on the biome id is mob spawning and growth from saplings.");

     */
    WriteCustomBiomes();

    WriteTitle("Biome Image Generator Variables");

    WriteNewLine();
    WriteComment(
        "Possible modes when generator outside image boundaries: Repeat, ContinueNormal, FillEmpty");
    WriteComment("   Repeat - repeat image");
    WriteComment("   ContinueNormal - continue normal generation");
    WriteComment("   FillEmpty - fill by biome in \"ImageFillBiome settings\" ");
    WriteValue(TCDefaultValues.ImageMode.name(), this.imageMode.name());

    WriteNewLine();
    WriteComment("Source png file for FromImage biome mode.");
    WriteValue(TCDefaultValues.ImageFile.name(), this.imageFile);

    WriteNewLine();
    WriteComment("Biome name for fill outside image boundaries with FillEmpty mode.");
    WriteValue(TCDefaultValues.ImageFillBiome.name(), this.imageFillBiome);

    WriteNewLine();
    WriteComment("Shifts map position from x=0 and z=0 coordinates.");
    WriteValue(TCDefaultValues.ImageXOffset.name(), this.imageXOffset);
    WriteValue(TCDefaultValues.ImageZOffset.name(), this.imageZOffset);

    WriteTitle("Terrain Generator Variables");
    WriteComment("Height bits determinate generation height. Min 5, max 8");
    WriteComment("For example 7 = 128 height, 8 = 256 height");
    WriteValue(TCDefaultValues.WorldHeightBits.name(), this.worldHeightBits);
    WriteNewLine();

    WriteComment(
        "Set water level. Every empty block under this level will be fill water or another block from WaterBlock ");
    WriteValue(TCDefaultValues.WaterLevelMax.name(), this.waterLevelMax);
    WriteValue(TCDefaultValues.WaterLevelMin.name(), this.waterLevelMin);
    WriteNewLine();
    WriteComment("BlockId used as water in WaterLevel");
    WriteValue(TCDefaultValues.WaterBlock.name(), this.waterBlock);
    WriteNewLine();
    WriteComment("BlockId used as ice");
    WriteValue(TCDefaultValues.IceBlock.name(), this.iceBlock);

    WriteNewLine();
    WriteComment(
        "Can increase (values greater than 0) or decrease (values less than 0) how much the landscape is fractured horizontally.");
    WriteValue(TCDefaultValues.FractureHorizontal.name(), this.fractureHorizontal);

    WriteNewLine();
    WriteComment(
        "Can increase (values greater than 0) or decrease (values less than 0) how much the landscape is fractured vertically.");
    WriteComment(
        "Positive values will lead to large cliffs/overhangs, floating islands, and/or a cavern world depending on other settings.");
    WriteValue(TCDefaultValues.FractureVertical.name(), this.fractureVertical);

    WriteNewLine();
    WriteComment("Attempts to replace all surface stone with biome surface block");
    WriteValue(TCDefaultValues.RemoveSurfaceStone.name(), this.removeSurfaceStone);

    WriteNewLine();
    WriteComment("Disable bottom of map bedrock generation");
    WriteValue(TCDefaultValues.DisableBedrock.name(), this.disableBedrock);

    WriteNewLine();
    WriteComment("Enable ceiling of map bedrock generation");
    WriteValue(TCDefaultValues.CeilingBedrock.name(), this.ceilingBedrock);

    WriteNewLine();
    WriteComment("Make bottom layer of bedrock flat");
    WriteValue(TCDefaultValues.FlatBedrock.name(), this.flatBedrock);

    WriteNewLine();
    WriteComment("BlockId used as bedrock");
    WriteValue(TCDefaultValues.BedrockobBlock.name(), this.bedrockBlock);

    WriteTitle("Map objects");
    WriteValue(TCDefaultValues.StrongholdsEnabled.name(), this.StrongholdsEnabled);
    WriteValue(TCDefaultValues.VillagesEnabled.name(), this.VillagesEnabled);
    WriteValue(TCDefaultValues.MineshaftsEnabled.name(), this.MineshaftsEnabled);
    WriteValue(TCDefaultValues.PyramidsEnabled.name(), this.PyramidsEnabled);
    WriteValue(TCDefaultValues.NetherFortressEnabled.name(), this.NetherFortress);

    this.WriteTitle("World visual settings");
    this.WriteComment(
        "Warning this section will work only for clients with single version of TerrainControl");

    WriteComment("World fog color");
    WriteColorValue(TCDefaultValues.WorldFog.name(), this.WorldFog);
    this.WriteNewLine();

    WriteComment("World night fog color");
    WriteColorValue(TCDefaultValues.WorldNightFog.name(), this.WorldNightFog);
    this.WriteNewLine();

    this.WriteTitle("BOB Objects Variables");

    /*WriteNewLine();
    WriteComment("Enable/disable custom objects");
    this.WriteValue(TCDefaultValues.CustomObjects.name(), this.customObjects);
    */
    WriteNewLine();
    WriteComment("Number of attempts for place per chunk");
    this.WriteValue(
        TCDefaultValues.objectSpawnRatio.name(), Integer.valueOf(this.objectSpawnRatio).intValue());
    /*
    WriteNewLine();
    WriteComment("Deny custom objects underFill even it enabled in objects ");
    this.WriteValue(TCDefaultValues.DenyObjectsUnderFill.name(), this.denyObjectsUnderFill);
    WriteNewLine();
    WriteComment("Chance to grow custom instead normal tree from sapling .");
    this.WriteValue(TCDefaultValues.customTreeChance.name(), this.customTreeChance);
    */

    WriteTitle("Cave Variables");

    WriteComment("TerrainControl attempts once per chunk to create a cave or cave system.");
    WriteComment("This is chance of success on that attempt.");
    WriteValue(TCDefaultValues.caveRarity.name(), this.caveRarity);
    WriteNewLine();
    WriteComment(
        "If successful, It tries to add this many caves in that chunk but trends towards lower results.");
    WriteComment("Input of 40 tends to result in 5-6 caves or cave systems starting per chunk.");
    WriteValue(TCDefaultValues.caveFrequency.name(), this.caveFrequency);
    WriteNewLine();
    WriteComment("Trends towards lower elevations.");
    WriteValue(TCDefaultValues.caveMinAltitude.name(), this.caveMinAltitude);
    WriteValue(TCDefaultValues.caveMaxAltitude.name(), this.caveMaxAltitude);
    WriteNewLine();
    WriteComment(
        "Chance that any cave made during \" caveFrequency\" will generate without a connecting cave or system.");
    WriteComment(
        "Will also attempt to create a pocket - a higher than normal density of cave systems nearby, however no guarantee of connecting to it.");
    WriteValue(TCDefaultValues.individualCaveRarity.name(), this.individualCaveRarity);
    WriteNewLine();
    WriteComment(
        "Number of attempts during \" caveFreqency\" to start a system instead of continuing a single cave.");
    WriteComment("Warning:High values cause extremely slow world generation and lag.");
    WriteValue(TCDefaultValues.caveSystemFrequency.name(), this.caveSystemFrequency);
    WriteNewLine();
    WriteComment(
        "Adds additional attempts for cave pocket after \"individualCaveRarity\" attempts.");
    WriteValue(TCDefaultValues.caveSystemPocketChance.name(), this.caveSystemPocketChance);
    WriteNewLine();
    WriteComment("When triggered, Overrides \"caveFrequency\"");
    WriteValue(TCDefaultValues.caveSystemPocketMinSize.name(), this.caveSystemPocketMinSize);
    WriteValue(TCDefaultValues.caveSystemPocketMaxSize.name(), this.caveSystemPocketMaxSize);
    WriteNewLine();
    WriteComment("Turns off Randomizer = CAVES EVERYWHERE!");
    WriteValue(TCDefaultValues.evenCaveDistribution.name(), this.evenCaveDistribution);

    WriteTitle("Canyon Variables");
    WriteValue(TCDefaultValues.canyonRarity.name(), this.canyonRarity);
    WriteValue(TCDefaultValues.canyonMinAltitude.name(), this.canyonMinAltitude);
    WriteValue(TCDefaultValues.canyonMaxAltitude.name(), this.canyonMaxAltitude);
    WriteValue(TCDefaultValues.canyonMinLength.name(), this.canyonMinLength);
    WriteValue(TCDefaultValues.canyonMaxLength.name(), this.canyonMaxLength);
    WriteValue(TCDefaultValues.canyonDepth.name(), this.canyonDepth);

    WriteNewLine();
    WriteTitle("Old Biome Generator Variables");
    WriteComment("This generator works only with old terrain generator!");
    // WriteComment("Since 1.8.3 notch take temperature from biomes, so changing this you can`t
    // affect new biome generation ");
    WriteValue(TCDefaultValues.oldBiomeSize.name(), this.oldBiomeSize);
    WriteValue(TCDefaultValues.minMoisture.name(), this.minMoisture);
    WriteValue(TCDefaultValues.maxMoisture.name(), this.maxMoisture);
    WriteValue(TCDefaultValues.minTemperature.name(), this.minTemperature);
    WriteValue(TCDefaultValues.maxTemperature.name(), this.maxTemperature);
  }
  @Override
  protected void writeConfigSettings() throws IOException {
    // The modes
    writeBigTitle("The modes");
    writeComment("What Terrain Control does with the config files.");
    writeComment("Possible modes: WriteAll, WriteWithoutComments, WriteDisable");
    writeComment("   WriteAll - default");
    writeComment("   WriteWithoutComments - write config files without help comments");
    writeComment(
        "   WriteDisable - doesn't write to the config files, it only reads. Doesn't auto-update the configs. Use with care!");
    writeValue(TCDefaultValues.SettingsMode.name(), this.SettingsMode.name());
    writeNewLine();

    writeComment("Possible terrain modes: Normal, OldGenerator, TerrainTest, NotGenerate, Default");
    writeComment("   Normal - use all features");
    writeComment("   OldGenerator - generate land like 1.7.3 generator");
    writeComment("   TerrainTest - generate only terrain without any resources");
    writeComment("   NotGenerate - generate empty chunks");
    writeComment("   Default - use default terrain generator");
    writeValue(TCDefaultValues.TerrainMode.name(), this.ModeTerrain.name());
    writeNewLine();

    writeComment("Possible biome modes: Normal, OldGenerator, Default");
    writeComment("   Normal - use all features");
    writeComment("   FromImage - get biomes from image file");
    writeComment("   OldGenerator - generate biome like the Beta 1.7.3 generator");
    writeComment("   Default - use default Notch biome generator");
    writeValue(
        TCDefaultValues.BiomeMode.name(), TerrainControl.getBiomeModeManager().getName(biomeMode));

    // Custom biomes
    writeBigTitle("Custom biomes");
    writeComment(
        "You need to register your custom biomes here. This setting will make Terrain Control");
    writeComment(
        "generate setting files for them. However, it won't place them in the world automatically.");
    writeComment("See the settings for your BiomeMode below on how to add them to the world.");
    writeComment("");
    writeComment("Syntax: CustomBiomes:BiomeName:id[,AnotherBiomeName:id[,...]]");
    writeComment("Example: CustomBiomes:TestBiome1:30,BiomeTest2:31");
    writeComment("This will add two biomes and generate the BiomeConfigs for them.");
    writeComment("All changes here need a server restart.");
    writeComment("");
    writeComment("Due to the way Mojang's loading code works, all biome ids need to be unique");
    writeComment(
        "on the server. If you don't do this, the client will display the biomes just fine,");
    writeComment(
        "but the server can think it is another biome with the same id. This will cause saplings,");
    writeComment("snowfall and mobs to work as in the other biome.");
    writeComment("");
    writeComment(
        "The available ids range from 0 to 255 and the ids 0 to "
            + (DefaultBiome.values().length - 1)
            + " are occupied by vanilla minecraft");
    writeComment(
        "biomes. To leave room for new vanilla biomes, it is recommend to not use ids below 30.");

    WriteCustomBiomes();

    // Settings for BiomeMode:Normal
    writeBigTitle("Settings for BiomeMode:Normal");
    writeComment("Also applies if you are using BiomeMode:FromImage and ImageMode:ContinueNormal.");
    writeNewLine();

    writeComment(
        "IMPORTANT value for generation. Bigger values appear to zoom out. All 'Sizes' must be smaller than this.");
    writeComment("Large %/total area biomes (Continents) must be set small, (limit=0)");
    writeComment(
        "Small %/total area biomes (Oasis,Mountain Peaks) must be larger (limit=GenerationDepth)");
    writeComment("This could also represent \"Total number of biome sizes\" ");
    writeComment(
        "Small values (about 1-2) and Large values (about 20) may affect generator performance.");
    writeValue(TCDefaultValues.GenerationDepth.name(), this.GenerationDepth);
    writeNewLine();

    writeComment(
        "Max biome rarity from 1 to infinity. By default this is 100, but you can raise it for");
    writeComment(
        "fine-grained control, or to create biomes with a chance of occurring smaller than 1/100.");
    writeValue(TCDefaultValues.BiomeRarityScale.name(), this.BiomeRarityScale);
    writeNewLine();

    writeSmallTitle("Biome lists");

    writeComment("Don't forget to register your custom biomes first in CustomBiomes!");
    writeNewLine();

    writeComment("Biomes which used in normal biome algorithm. Biome name is case sensitive.");
    writeValue(TCDefaultValues.NormalBiomes.name(), this.NormalBiomes);
    writeNewLine();

    writeComment("Biomes which used in ice biome algorithm. Biome name is case sensitive.");
    writeValue(TCDefaultValues.IceBiomes.name(), this.IceBiomes);
    writeNewLine();

    writeComment(
        "Biomes which used as isles. You must set IsleInBiome in biome config for each biome here. Biome name is case sensitive.");
    writeValue(TCDefaultValues.IsleBiomes.name(), this.IsleBiomes);
    writeNewLine();

    writeComment(
        "Biomes which used as borders. You must set BiomeIsBorder in biome config for each biome here. Biome name is case sensitive.");
    writeValue(TCDefaultValues.BorderBiomes.name(), this.BorderBiomes);
    writeNewLine();

    writeSmallTitle("Landmass settings (for NormalBiomes)");

    writeComment(
        "Land rarity from 100 to 1. If you set smaller than 90 and LandSize near 0 beware Big oceans.");
    writeValue(TCDefaultValues.LandRarity.name(), this.LandRarity);
    writeNewLine();

    writeComment("Land size from 0 to GenerationDepth.");
    writeValue(TCDefaultValues.LandSize.name(), this.LandSize);
    writeNewLine();

    writeComment(
        "Make land more fuzzy and make lakes. Must be from 0 to GenerationDepth - LandSize");
    writeValue(TCDefaultValues.LandFuzzy.name(), this.LandFuzzy);
    writeNewLine();

    writeSmallTitle("Ice area settings (for IceBiomes)");

    writeComment(
        "Ice areas rarity from 100 to 1. If you set smaller than 90 and IceSize near 0 beware ice world");
    writeValue(TCDefaultValues.IceRarity.name(), this.IceRarity);
    writeNewLine();

    writeComment("Ice area size from 0 to GenerationDepth.");
    writeValue(TCDefaultValues.IceSize.name(), this.IceSize);
    writeNewLine();

    writeValue(TCDefaultValues.FrozenOcean.name(), this.FrozenOcean);
    writeNewLine();

    writeSmallTitle("River settings");

    writeComment("River rarity.Must be from 0 to GenerationDepth.");
    writeValue(TCDefaultValues.RiverRarity.name(), this.RiverRarity);
    writeNewLine();

    writeComment("River size from 0 to GenerationDepth - RiverRarity");
    writeValue(TCDefaultValues.RiverSize.name(), this.RiverSize);
    writeNewLine();

    writeValue(TCDefaultValues.RiversEnabled.name(), this.RiversEnabled);
    writeNewLine();

    // Settings for BiomeMode:FromImage
    writeBigTitle("Settings for BiomeMode:FromImage");

    writeComment(
        "Possible modes when generator outside image boundaries: Repeat, ContinueNormal, FillEmpty");
    writeComment("   Repeat - repeat image");
    writeComment("   ContinueNormal - continue normal generation");
    writeComment("   FillEmpty - fill by biome in \"ImageFillBiome settings\" ");
    writeValue(TCDefaultValues.ImageMode.name(), this.imageMode.name());
    writeNewLine();

    writeComment("Source png file for FromImage biome mode.");
    writeValue(TCDefaultValues.ImageFile.name(), this.imageFile);
    writeNewLine();

    writeComment("Biome name for fill outside image boundaries with FillEmpty mode.");
    writeValue(TCDefaultValues.ImageFillBiome.name(), this.imageFillBiome);
    writeNewLine();

    writeComment("Shifts map position from x=0 and z=0 coordinates.");
    writeValue(TCDefaultValues.ImageXOffset.name(), this.imageXOffset);
    writeValue(TCDefaultValues.ImageZOffset.name(), this.imageZOffset);

    // Terrain Generator Variables
    writeBigTitle("Terrain Generator Variables");
    writeComment("Height bits determinate generation height. Min 5, max 8");
    writeComment("For example 7 = 128 height, 8 = 256 height");
    writeValue(TCDefaultValues.WorldHeightBits.name(), this.worldHeightBits);
    writeNewLine();

    writeComment(
        "Set water level. Every empty block under this level will be fill water or another block from WaterBlock ");
    writeValue(TCDefaultValues.WaterLevelMax.name(), this.waterLevelMax);
    writeValue(TCDefaultValues.WaterLevelMin.name(), this.waterLevelMin);
    writeNewLine();
    writeComment("BlockId used as water in WaterLevel");
    writeValue(TCDefaultValues.WaterBlock.name(), this.waterBlock);
    writeNewLine();
    writeComment("BlockId used as ice");
    writeValue(TCDefaultValues.IceBlock.name(), this.iceBlock);

    writeNewLine();
    writeComment(
        "Can increase (values greater than 0) or decrease (values less than 0) how much the landscape is fractured horizontally.");
    writeValue(TCDefaultValues.FractureHorizontal.name(), this.fractureHorizontal);

    writeNewLine();
    writeComment(
        "Can increase (values greater than 0) or decrease (values less than 0) how much the landscape is fractured vertically.");
    writeComment(
        "Positive values will lead to large cliffs/overhangs, floating islands, and/or a cavern world depending on other settings.");
    writeValue(TCDefaultValues.FractureVertical.name(), this.fractureVertical);

    writeNewLine();
    writeComment("Attempts to replace all surface stone with biome surface block");
    writeValue(TCDefaultValues.RemoveSurfaceStone.name(), this.removeSurfaceStone);

    writeNewLine();
    writeComment("Disable bottom of map bedrock generation");
    writeValue(TCDefaultValues.DisableBedrock.name(), this.disableBedrock);

    writeNewLine();
    writeComment("Enable ceiling of map bedrock generation");
    writeValue(TCDefaultValues.CeilingBedrock.name(), this.ceilingBedrock);

    writeNewLine();
    writeComment("Make bottom layer of bedrock flat");
    writeValue(TCDefaultValues.FlatBedrock.name(), this.flatBedrock);

    writeNewLine();
    writeComment("BlockId used as bedrock");
    writeValue(TCDefaultValues.BedrockobBlock.name(), this.bedrockBlock);

    if (objectSpawnRatio != 1) {
      // Write the old objectSpawnRatio
      writeNewLine();
      writeComment(
          "LEGACY setting for compability with old worlds. This setting should be kept at 1.");
      writeComment(
          "If the setting is set at 1, the setting will vanish from the config file. Readd it");
      writeComment("manually with another value and it will be back.");
      writeComment("");
      writeComment(
          "When using the UseWorld or UseBiome keyword for spawning custom objects, Terrain Control");
      writeComment("spawns one of the possible custom objects. There is of course a chance that");
      writeComment(
          "the chosen object cannot spawn. This setting tells TC how many times it should");
      writeComment("try to spawn that object.");
      writeComment("This setting doesn't affect growing saplings anymore.");
      this.writeValue(TCDefaultValues.objectSpawnRatio.name(), this.objectSpawnRatio);
    }

    // Strongholds
    writeBigTitle("Strongholds");
    writeComment(
        "Not much is known about these settings. They are directly passed to the stronghold generator.");
    writeValue(TCDefaultValues.StrongholdsEnabled.name(), this.strongholdsEnabled);
    writeNewLine();
    writeValue(TCDefaultValues.StrongholdCount.name(), this.strongholdCount);
    writeNewLine();
    writeValue(TCDefaultValues.StrongholdDistance.name(), this.strongholdDistance);
    writeNewLine();
    writeValue(TCDefaultValues.StrongholdSpread.name(), this.strongholdSpread);

    // Villages
    writeBigTitle("Villages");
    writeComment("Whether the villages are enabled or not.");
    writeValue(TCDefaultValues.VillagesEnabled.name(), this.villagesEnabled);
    writeNewLine();
    writeComment(
        "The size of the village. Larger is bigger. Normal worlds have 0 as default, superflat worlds 1.");
    writeValue(TCDefaultValues.VillageSize.name(), this.villageSize);
    writeNewLine();
    writeComment("The minimum distance between the village centers in chunks. Minimum value is 9.");
    writeValue(TCDefaultValues.VillageDistance.name(), this.villageDistance);

    // Rare buildings
    writeBigTitle("Rare buildings");
    writeComment("Rare buildings are either desert pyramids, jungle temples or swamp huts.");
    writeNewLine();
    writeComment("Whether rare buildings are enabled.");
    writeValue(TCDefaultValues.RareBuildingsEnabled.name(), this.rareBuildingsEnabled);
    writeNewLine();
    writeComment("The minimum distance between rare buildings in chunks.");
    writeValue(
        TCDefaultValues.MinimumDistanceBetweenRareBuildings.name(),
        this.minimumDistanceBetweenRareBuildings);
    writeNewLine();
    writeComment("The maximum distance between rare buildings in chunks.");
    writeValue(
        TCDefaultValues.MaximumDistanceBetweenRareBuildings.name(),
        this.maximumDistanceBetweenRareBuildings);

    // Other structures
    writeBigTitle("Other structures");
    writeValue(TCDefaultValues.MineshaftsEnabled.name(), this.mineshaftsEnabled);
    writeValue(TCDefaultValues.NetherFortressesEnabled.name(), this.netherFortressesEnabled);

    // Visual settings
    this.writeBigTitle("Visual settings");
    this.writeComment(
        "Warning this section will work only for players with the single version of Terrain Control installed.");

    writeComment("World fog color");
    writeColorValue(TCDefaultValues.WorldFog.name(), this.WorldFog);
    this.writeNewLine();

    writeComment("World night fog color");
    writeColorValue(TCDefaultValues.WorldNightFog.name(), this.WorldNightFog);
    this.writeNewLine();

    // Cave settings (still using code from Bucyruss' BiomeTerrainMod)
    writeBigTitle("Cave settings");

    writeComment(
        "This controls the odds that a given chunk will host a single cave and/or the start of a cave system.");
    writeValue(TCDefaultValues.caveRarity.name(), this.caveRarity);
    writeNewLine();

    writeComment(
        "The number of times the cave generation algorithm will attempt to create single caves and cave");
    writeComment(
        "systems in the given chunk. This value is larger because the likelihood for the cave generation");
    writeComment(
        "algorithm to bailout is fairly high and it is used in a randomizer that trends towards lower");
    writeComment(
        "random numbers. With an input of 40 (default) the randomizer will result in an average random");
    writeComment(
        "result of 5 to 6. This can be turned off by setting evenCaveDistribution (below) to true.");
    writeValue(TCDefaultValues.caveFrequency.name(), this.caveFrequency);
    writeNewLine();

    writeComment(
        "Sets the minimum and maximum altitudes at which caves will be generated. These values are");
    writeComment(
        "used in a randomizer that trends towards lower numbers so that caves become more frequent");
    writeComment(
        "the closer you get to the bottom of the map. Setting even cave distribution (above) to true");
    writeComment(
        "will turn off this randomizer and use a flat random number generator that will create an even");
    writeComment("density of caves at all altitudes.");
    writeValue(TCDefaultValues.caveMinAltitude.name(), this.caveMinAltitude);
    writeValue(TCDefaultValues.caveMaxAltitude.name(), this.caveMaxAltitude);
    writeNewLine();

    writeComment(
        "The odds that the cave generation algorithm will generate a single cavern without an accompanying");
    writeComment(
        "cave system. Note that whenever the algorithm generates an individual cave it will also attempt to");
    writeComment(
        "generate a pocket of cave systems in the vicinity (no guarantee of connection or that the cave system");
    writeComment("will actually be created).");
    writeValue(TCDefaultValues.individualCaveRarity.name(), this.individualCaveRarity);
    writeNewLine();

    writeComment(
        "The number of times the algorithm will attempt to start a cave system in a given chunk per cycle of");
    writeComment(
        "the cave generation algorithm (see cave frequency setting above). Note that setting this value too");
    writeComment(
        "high with an accompanying high cave frequency value can cause extremely long world generation time.");
    writeValue(TCDefaultValues.caveSystemFrequency.name(), this.caveSystemFrequency);
    writeNewLine();

    writeComment(
        "This can be set to create an additional chance that a cave system pocket (a higher than normal");
    writeComment(
        "density of cave systems) being started in a given chunk. Normally, a cave pocket will only be");
    writeComment(
        "attempted if an individual cave is generated, but this will allow more cave pockets to be generated");
    writeComment("in addition to the individual cave trigger.");
    writeValue(TCDefaultValues.caveSystemPocketChance.name(), this.caveSystemPocketChance);
    writeNewLine();

    writeComment(
        "The minimum and maximum size that a cave system pocket can be. This modifies/overrides the");
    writeComment("cave system frequency setting (above) when triggered.");
    writeValue(TCDefaultValues.caveSystemPocketMinSize.name(), this.caveSystemPocketMinSize);
    writeValue(TCDefaultValues.caveSystemPocketMaxSize.name(), this.caveSystemPocketMaxSize);
    writeNewLine();

    writeComment(
        "Setting this to true will turn off the randomizer for cave frequency (above). Do note that");
    writeComment(
        "if you turn this on you will probably want to adjust the cave frequency down to avoid long");
    writeComment("load times at world creation.");
    writeValue(TCDefaultValues.evenCaveDistribution.name(), this.evenCaveDistribution);

    // Canyon settings
    writeBigTitle("Canyon settings");
    writeValue(TCDefaultValues.canyonRarity.name(), this.canyonRarity);
    writeValue(TCDefaultValues.canyonMinAltitude.name(), this.canyonMinAltitude);
    writeValue(TCDefaultValues.canyonMaxAltitude.name(), this.canyonMaxAltitude);
    writeValue(TCDefaultValues.canyonMinLength.name(), this.canyonMinLength);
    writeValue(TCDefaultValues.canyonMaxLength.name(), this.canyonMaxLength);
    writeValue(TCDefaultValues.canyonDepth.name(), this.canyonDepth);

    // Settings for BiomeMode:OldGenerator
    writeBigTitle("Settings for BiomeMode:OldGenerator");
    writeComment("This generator works only with old terrain generator!");
    writeValue(TCDefaultValues.oldBiomeSize.name(), this.oldBiomeSize);
    writeValue(TCDefaultValues.minMoisture.name(), this.minMoisture);
    writeValue(TCDefaultValues.maxMoisture.name(), this.maxMoisture);
    writeValue(TCDefaultValues.minTemperature.name(), this.minTemperature);
    writeValue(TCDefaultValues.maxTemperature.name(), this.maxTemperature);
  }