Search in sources :

Example 1 with StructureSettings

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());
}
Also used : StructureSettings(net.minecraft.world.level.levelgen.StructureSettings) NoiseGeneratorSettings(net.minecraft.world.level.levelgen.NoiseGeneratorSettings)

Aggregations

NoiseGeneratorSettings (net.minecraft.world.level.levelgen.NoiseGeneratorSettings)1 StructureSettings (net.minecraft.world.level.levelgen.StructureSettings)1