Vertical biomes size config
This commit is contained in:
parent
84d465c0f6
commit
b6bc8acf6b
2 changed files with 14 additions and 1 deletions
|
@ -146,7 +146,14 @@ public class BCLibNetherBiomeSource extends BiomeSource {
|
||||||
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 && GeneratorOptions.useVerticalBiomes()) {
|
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,
|
||||||
|
GeneratorOptions.getVerticalBiomeSizeNether(),
|
||||||
|
worldHeight,
|
||||||
|
mapConstructor
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.biomeMap = mapConstructor.apply(seed, GeneratorOptions.getBiomeSizeNether(), BiomeAPI.NETHER_BIOME_PICKER);
|
this.biomeMap = mapConstructor.apply(seed, GeneratorOptions.getBiomeSizeNether(), BiomeAPI.NETHER_BIOME_PICKER);
|
||||||
|
|
|
@ -8,6 +8,7 @@ import java.util.function.Function;
|
||||||
|
|
||||||
public class GeneratorOptions {
|
public class GeneratorOptions {
|
||||||
private static int biomeSizeNether;
|
private static int biomeSizeNether;
|
||||||
|
private static int biomeVSizeNether;
|
||||||
private static int biomeSizeEndLand;
|
private static int biomeSizeEndLand;
|
||||||
private static int biomeSizeEndVoid;
|
private static int biomeSizeEndVoid;
|
||||||
private static Function<Point, Boolean> endLandFunction;
|
private static Function<Point, Boolean> endLandFunction;
|
||||||
|
@ -21,6 +22,7 @@ public class GeneratorOptions {
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
biomeSizeNether = Configs.GENERATOR_CONFIG.getInt("nether.biomeMap", "biomeSize", 256);
|
biomeSizeNether = Configs.GENERATOR_CONFIG.getInt("nether.biomeMap", "biomeSize", 256);
|
||||||
|
biomeVSizeNether = Configs.GENERATOR_CONFIG.getInt("nether.biomeMap", "biomeVerticalSize(onlyInTallNether)", 86);
|
||||||
biomeSizeEndLand = Configs.GENERATOR_CONFIG.getInt("end.biomeMap", "biomeSizeLand", 256);
|
biomeSizeEndLand = Configs.GENERATOR_CONFIG.getInt("end.biomeMap", "biomeSizeLand", 256);
|
||||||
biomeSizeEndVoid = Configs.GENERATOR_CONFIG.getInt("end.biomeMap", "biomeSizeVoid", 256);
|
biomeSizeEndVoid = Configs.GENERATOR_CONFIG.getInt("end.biomeMap", "biomeSizeVoid", 256);
|
||||||
customNetherBiomeSource = Configs.GENERATOR_CONFIG.getBoolean("options", "customNetherBiomeSource", true);
|
customNetherBiomeSource = Configs.GENERATOR_CONFIG.getBoolean("options", "customNetherBiomeSource", true);
|
||||||
|
@ -35,6 +37,10 @@ public class GeneratorOptions {
|
||||||
return Mth.clamp(biomeSizeNether, 1, 8192);
|
return Mth.clamp(biomeSizeNether, 1, 8192);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int getVerticalBiomeSizeNether() {
|
||||||
|
return Mth.clamp(biomeVSizeNether, 1, 8192);
|
||||||
|
}
|
||||||
|
|
||||||
public static int getBiomeSizeEndLand() {
|
public static int getBiomeSizeEndLand() {
|
||||||
return Mth.clamp(biomeSizeEndLand, 1, 8192);
|
return Mth.clamp(biomeSizeEndLand, 1, 8192);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue