use of net.tropicraft.core.common.dimension.biome.TropicraftBiomeProvider in project Tropicraft by Tropicraft.
the class TropicraftDimension method createGenerator.
public static ChunkGenerator createGenerator(Registry<Biome> biomeRegistry, Registry<NoiseGeneratorSettings> dimensionSettingsRegistry, long seed) {
Supplier<NoiseGeneratorSettings> dimensionSettings = () -> {
// fallback to overworld so that we don't crash before our datapack is loaded (horrible workaround)
NoiseGeneratorSettings settings = dimensionSettingsRegistry.get(DIMENSION_SETTINGS);
return settings != null ? settings : dimensionSettingsRegistry.getOrThrow(NoiseGeneratorSettings.OVERWORLD);
};
TropicraftBiomeProvider biomeSource = new TropicraftBiomeProvider(seed, biomeRegistry);
return new TropicraftChunkGenerator(biomeSource, seed, dimensionSettings);
}
Aggregations