Minor additions to BiomeAPI
This commit is contained in:
parent
329509d5c0
commit
7d9b56b6e7
2 changed files with 12 additions and 0 deletions
|
@ -12,7 +12,9 @@ import ru.bclib.BCLib;
|
|||
import ru.bclib.api.BiomeAPI;
|
||||
import ru.bclib.world.biomes.BCLBiome;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class BCLibNetherBiomeSource extends BiomeSource {
|
||||
public static final Codec<BCLibNetherBiomeSource> CODEC = RecordCodecBuilder.create((instance) -> {
|
||||
|
@ -26,6 +28,8 @@ public class BCLibNetherBiomeSource extends BiomeSource {
|
|||
private BiomeMap biomeMap;
|
||||
private final long seed;
|
||||
|
||||
public static final List<Consumer<BCLibNetherBiomeSource>> onInit = new LinkedList<>();
|
||||
|
||||
public BCLibNetherBiomeSource(Registry<Biome> biomeRegistry, long seed) {
|
||||
super(getBiomes(biomeRegistry));
|
||||
|
||||
|
@ -53,6 +57,8 @@ public class BCLibNetherBiomeSource extends BiomeSource {
|
|||
this.biomeMap = new BiomeMap(seed, GeneratorOptions.getBiomeSizeNether(), BiomeAPI.NETHER_BIOME_PICKER);
|
||||
this.biomeRegistry = biomeRegistry;
|
||||
this.seed = seed;
|
||||
|
||||
onInit.forEach(consumer->consumer.accept(this));
|
||||
}
|
||||
|
||||
private static List<Biome> getBiomes(Registry<Biome> biomeRegistry) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue