override for the nether biome generator that is used by BN when older worlds are loaded
This commit is contained in:
parent
39255e140f
commit
c6dc52a60d
2 changed files with 15 additions and 3 deletions
|
@ -33,6 +33,18 @@ public class BCLibNetherBiomeSource extends BiomeSource {
|
||||||
private final Registry<Biome> biomeRegistry;
|
private final Registry<Biome> biomeRegistry;
|
||||||
private BiomeMap biomeMap;
|
private BiomeMap biomeMap;
|
||||||
private final long seed;
|
private final long seed;
|
||||||
|
private static boolean forceLegacyGenerator = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When true, the older square generator is used for the nether.
|
||||||
|
*
|
||||||
|
* This override is used (for example) by BetterNether to force the legacy generation for worlds
|
||||||
|
* that were created before 1.18
|
||||||
|
* @param val wether or not you want to force the old generatore.
|
||||||
|
*/
|
||||||
|
public static void setForceLegacyGeneration(boolean val){
|
||||||
|
forceLegacyGenerator = val;
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated(forRemoval = true)
|
@Deprecated(forRemoval = true)
|
||||||
public static final List<Consumer<BCLibNetherBiomeSource>> onInit = new LinkedList<>();
|
public static final List<Consumer<BCLibNetherBiomeSource>> onInit = new LinkedList<>();
|
||||||
|
@ -65,7 +77,7 @@ public class BCLibNetherBiomeSource extends BiomeSource {
|
||||||
BiomeAPI.NETHER_BIOME_PICKER.getBiomes().forEach(biome -> biome.updateActualBiomes(biomeRegistry));
|
BiomeAPI.NETHER_BIOME_PICKER.getBiomes().forEach(biome -> biome.updateActualBiomes(biomeRegistry));
|
||||||
BiomeAPI.NETHER_BIOME_PICKER.rebuild();
|
BiomeAPI.NETHER_BIOME_PICKER.rebuild();
|
||||||
|
|
||||||
if (GeneratorOptions.useOldBiomeGenerator()) {
|
if (GeneratorOptions.useOldBiomeGenerator() || forceLegacyGenerator) {
|
||||||
this.biomeMap = new SquareBiomeMap(seed, GeneratorOptions.getBiomeSizeNether(), BiomeAPI.NETHER_BIOME_PICKER);
|
this.biomeMap = new SquareBiomeMap(seed, GeneratorOptions.getBiomeSizeNether(), BiomeAPI.NETHER_BIOME_PICKER);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue