use of net.minecraft.world.level.levelgen.StructureSettings in project MinecraftForge by MinecraftForge.
the class DimensionSettingsTest method createNoiseGenerationSettings.
/**
* Create a NoiseGeneratorSettings instance copying all but the structure settings from overworld.
*/
private static NoiseGeneratorSettings createNoiseGenerationSettings() {
NoiseGeneratorSettings overworld = BuiltinRegistries.NOISE_GENERATOR_SETTINGS.getOrThrow(NoiseGeneratorSettings.OVERWORLD);
// Make a new StructureSettings with no structures
StructureSettings structures = new StructureSettings(Optional.empty(), new HashMap<>());
// Build a new NoiseGeneratorSettings copying all the other options from 'overworld'
return new NoiseGeneratorSettings(structures, overworld.noiseSettings(), overworld.getDefaultBlock(), overworld.getDefaultFluid(), overworld.surfaceRule(), overworld.seaLevel(), overworld.disableMobGeneration(), overworld.isAquifersEnabled(), overworld.isNoiseCavesEnabled(), overworld.isOreVeinsEnabled(), overworld.isNoodleCavesEnabled(), overworld.useLegacyRandomSource());
}
Aggregations