Vertical biomes config

This commit is contained in:
paulevsGitch 2021-12-09 12:20:18 +03:00
parent 2f680d4c13
commit 84d465c0f6
2 changed files with 7 additions and 1 deletions

View file

@ -145,7 +145,7 @@ public class BCLibNetherBiomeSource extends BiomeSource {
private void initMap() { private void initMap() {
boolean useLegacy = GeneratorOptions.useOldBiomeGenerator() || forceLegacyGenerator; boolean useLegacy = GeneratorOptions.useOldBiomeGenerator() || forceLegacyGenerator;
TriFunction<Long, Integer, BiomePicker, BiomeMap> mapConstructor = useLegacy ? SquareBiomeMap::new : HexBiomeMap::new; TriFunction<Long, Integer, BiomePicker, BiomeMap> mapConstructor = useLegacy ? SquareBiomeMap::new : HexBiomeMap::new;
if (worldHeight > 128) { if (worldHeight > 128 && GeneratorOptions.useVerticalBiomes()) {
this.biomeMap = new MapStack(seed, GeneratorOptions.getBiomeSizeNether(), BiomeAPI.NETHER_BIOME_PICKER, 86, worldHeight, mapConstructor); this.biomeMap = new MapStack(seed, GeneratorOptions.getBiomeSizeNether(), BiomeAPI.NETHER_BIOME_PICKER, 86, worldHeight, mapConstructor);
} }
else { else {

View file

@ -16,6 +16,7 @@ public class GeneratorOptions {
private static boolean addNetherBiomesByCategory = false; private static boolean addNetherBiomesByCategory = false;
private static boolean addEndBiomesByCategory = false; private static boolean addEndBiomesByCategory = false;
private static boolean useOldBiomeGenerator = false; private static boolean useOldBiomeGenerator = false;
private static boolean verticalBiomes = true;
private static long farEndBiomesSqr = 1000000; private static long farEndBiomesSqr = 1000000;
public static void init() { public static void init() {
@ -27,6 +28,7 @@ public class GeneratorOptions {
addNetherBiomesByCategory = Configs.GENERATOR_CONFIG.getBoolean("options", "addNetherBiomesByCategory", false); addNetherBiomesByCategory = Configs.GENERATOR_CONFIG.getBoolean("options", "addNetherBiomesByCategory", false);
addEndBiomesByCategory = Configs.GENERATOR_CONFIG.getBoolean("options", "addEndBiomesByCategory", false); addEndBiomesByCategory = Configs.GENERATOR_CONFIG.getBoolean("options", "addEndBiomesByCategory", false);
useOldBiomeGenerator = Configs.GENERATOR_CONFIG.getBoolean("options", "useOldBiomeGenerator", false); useOldBiomeGenerator = Configs.GENERATOR_CONFIG.getBoolean("options", "useOldBiomeGenerator", false);
verticalBiomes = Configs.GENERATOR_CONFIG.getBoolean("options", "verticalBiomesInTallNether", true);
} }
public static int getBiomeSizeNether() { public static int getBiomeSizeNether() {
@ -80,4 +82,8 @@ public class GeneratorOptions {
public static boolean useOldBiomeGenerator() { public static boolean useOldBiomeGenerator() {
return useOldBiomeGenerator; return useOldBiomeGenerator;
} }
public static boolean useVerticalBiomes() {
return verticalBiomes;
}
} }