feat: add more config options
This commit is contained in:
parent
816a5b7523
commit
5c38b79d9c
3 changed files with 15 additions and 8 deletions
|
@ -24,7 +24,7 @@ apply from: './gradle/scripts/mixins.gradle'
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
|
||||||
version = "1.5.0"
|
version = "1.6.0"
|
||||||
group= "dev.tilera.modding"
|
group= "dev.tilera.modding"
|
||||||
archivesBaseName = "cwg"
|
archivesBaseName = "cwg"
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ public class Config {
|
||||||
public static boolean classicExtremeHills = false;
|
public static boolean classicExtremeHills = false;
|
||||||
public static boolean disableHeightTemperature = false;
|
public static boolean disableHeightTemperature = false;
|
||||||
public static boolean enableFarlands = false;
|
public static boolean enableFarlands = false;
|
||||||
|
public static boolean disableJungle = false;
|
||||||
|
public static boolean disableModdedBiomes = false;
|
||||||
|
|
||||||
public static void initConfig() {
|
public static void initConfig() {
|
||||||
conf = new Configuration(new File(Loader.instance().getConfigDir(), "ClassicWorldgen.cfg"));
|
conf = new Configuration(new File(Loader.instance().getConfigDir(), "ClassicWorldgen.cfg"));
|
||||||
|
@ -28,6 +30,8 @@ public class Config {
|
||||||
disableHeightTemperature = conf.getBoolean("disableHeightTemperature", "tweaks", disableHeightTemperature, "disable snow on mountains");
|
disableHeightTemperature = conf.getBoolean("disableHeightTemperature", "tweaks", disableHeightTemperature, "disable snow on mountains");
|
||||||
changeWorldTypeCommand = conf.getBoolean("changeTypeCommand", "commands", changeWorldTypeCommand, "enable command to change the WorldType");
|
changeWorldTypeCommand = conf.getBoolean("changeTypeCommand", "commands", changeWorldTypeCommand, "enable command to change the WorldType");
|
||||||
enableFarlands = conf.getBoolean("enableFarlands", "tweaks", enableFarlands, "reenable the Farlands!");
|
enableFarlands = conf.getBoolean("enableFarlands", "tweaks", enableFarlands, "reenable the Farlands!");
|
||||||
|
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");
|
||||||
conf.save();
|
conf.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ public class GenLayerBiomeClassic extends GenLayer {
|
||||||
ArrayList<BiomeEntry> biomeEntries = new ArrayList<>();
|
ArrayList<BiomeEntry> biomeEntries = new ArrayList<>();
|
||||||
|
|
||||||
for (BiomeGenBase b : vanillaBiomes) {
|
for (BiomeGenBase b : vanillaBiomes) {
|
||||||
|
if (Config.disableJungle && b == BiomeGenBase.jungle) continue;
|
||||||
addedBiomes.add(b);
|
addedBiomes.add(b);
|
||||||
biomeEntries.add(new BiomeEntry(b, 10));
|
biomeEntries.add(new BiomeEntry(b, 10));
|
||||||
}
|
}
|
||||||
|
@ -53,13 +54,15 @@ public class GenLayerBiomeClassic extends GenLayer {
|
||||||
addedBiomes.add(BiomeGenBase.megaTaiga);
|
addedBiomes.add(BiomeGenBase.megaTaiga);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (BiomeType t : BiomeType.values()) {
|
if (!Config.disableModdedBiomes) {
|
||||||
ImmutableList<BiomeEntry> biomesToAdd = BiomeManager.getBiomes(t);
|
for (BiomeType t : BiomeType.values()) {
|
||||||
for (BiomeEntry biome : biomesToAdd) {
|
ImmutableList<BiomeEntry> biomesToAdd = BiomeManager.getBiomes(t);
|
||||||
if ((biome.biome.biomeID < 40 && Config.blockNewVanillaBiomes) || addedBiomes.contains(biome.biome)) continue;
|
for (BiomeEntry biome : biomesToAdd) {
|
||||||
addedBiomes.add(biome.biome);
|
if ((biome.biome.biomeID < 40 && Config.blockNewVanillaBiomes) || addedBiomes.contains(biome.biome)) continue;
|
||||||
biomeEntries.add(biome);
|
addedBiomes.add(biome.biome);
|
||||||
if (biome.itemWeight != 10) hasBiomeWeights = true;
|
biomeEntries.add(biome);
|
||||||
|
if (biome.itemWeight != 10) hasBiomeWeights = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
allowedBiomes = biomeEntries.toArray(new BiomeEntry[biomeEntries.size()]);
|
allowedBiomes = biomeEntries.toArray(new BiomeEntry[biomeEntries.size()]);
|
||||||
|
|
Loading…
Reference in a new issue