feat: added config option

This commit is contained in:
Timo Ley 2024-09-30 15:19:13 +02:00
parent 21f048252c
commit cae9925109
2 changed files with 3 additions and 0 deletions

View file

@ -16,6 +16,7 @@ public class Config {
public static boolean disableJungle = false;
public static boolean disableModdedBiomes = false;
public static boolean enableDesertLakes = true;
public static boolean enableModdedWorldgen = true;
public static void initConfig() {
conf = new Configuration(new File(Loader.instance().getConfigDir(), "ClassicWorldgen.cfg"));
@ -28,6 +29,7 @@ public class Config {
disableJungle = conf.getBoolean("disableJungle", "worldgen", disableJungle, "prevent jungle biomes from generating in classic worldgen");
disableModdedBiomes = conf.getBoolean("disableModdedBiomes", "worldgen", disableModdedBiomes, "prevent modded biomes from generating in classic worldgen");
enableDesertLakes = conf.getBoolean("enableDesertLakes", "worldgen", enableDesertLakes, "enable lakes in desert in classic worldgen");
enableModdedWorldgen = conf.getBoolean("enableModdedWorldgen", "worldgen", enableModdedWorldgen, "enable worldgen features from other mods");
conf.save();
}

View file

@ -36,6 +36,7 @@ public class ConfigProvider implements IGeneratorOptionProvider {
case "cwg:generator.classic:disableJungle": return Config.disableJungle;
case "cwg:generator.classic:newVanillaBiomes": return Config.addNewVanillaBiomes;
case "cwg:generator.classic:disableModdedBiomes": return Config.addNewVanillaBiomes;
case "cwg:generator.classic:enableModdedWorldgen": return Config.enableModdedWorldgen;
default: return parent.getBoolean(id);
}
}